From 90f5f1782bc120980ffe996b627b394fff08cdd9 Mon Sep 17 00:00:00 2001 From: Wish Date: Tue, 17 May 2022 17:00:37 +0800 Subject: [PATCH] Update kvproto reference --- contrib/kvproto | 2 +- dbms/src/Flash/FlashService.cpp | 6 ------ dbms/src/Flash/Management/ManualCompact.cpp | 4 ++++ 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/contrib/kvproto b/contrib/kvproto index d229fcc888c..12e2f5a9d16 160000 --- a/contrib/kvproto +++ b/contrib/kvproto @@ -1 +1 @@ -Subproject commit d229fcc888c88506e1a81be0bc19df56623b99da +Subproject commit 12e2f5a9d167f46602804840857ddc8ff06dc695 diff --git a/dbms/src/Flash/FlashService.cpp b/dbms/src/Flash/FlashService.cpp index 3d2e826ae86..7ff88c2cd6b 100644 --- a/dbms/src/Flash/FlashService.cpp +++ b/dbms/src/Flash/FlashService.cpp @@ -434,12 +434,6 @@ ::grpc::Status FlashService::Compact(::grpc::ServerContext * grpc_context, const return grpc::Status(grpc::PERMISSION_DENIED, tls_err_msg); } - // auto [context, status] = createDBContext(grpc_context); - // if (!status.ok()) - // { - // return status; - // } - return manual_compact_manager->handleRequest(request, response); } diff --git a/dbms/src/Flash/Management/ManualCompact.cpp b/dbms/src/Flash/Management/ManualCompact.cpp index b56c43220b5..39354f56f5b 100644 --- a/dbms/src/Flash/Management/ManualCompact.cpp +++ b/dbms/src/Flash/Management/ManualCompact.cpp @@ -167,6 +167,8 @@ grpc::Status ManualCompactManager::doWork(const ::kvrpcpb::CompactRequest * requ Stopwatch timer; + LOG_FMT_INFO(log, "Manual compaction begin for table {}, start_key = {}", request->physical_table_id(), start_key.toDebugString()); + // Repeatedly merge multiple segments as much as possible. while (true) { @@ -204,6 +206,8 @@ grpc::Status ManualCompactManager::doWork(const ::kvrpcpb::CompactRequest * requ throw Exception("Assert failed", ErrorCodes::LOGICAL_ERROR); } + LOG_FMT_INFO(log, "Manual compaction finished for table {}, compacted_start_key = {}, compacted_end_key = {}, has_remaining = {}, compacted_segments = {}, elapsed_ms = {}", request->physical_table_id(), compacted_start_key ? compacted_start_key->toDebugString() : "(null)", compacted_end_key ? compacted_end_key->toDebugString() : "(null)", has_remaining, compacted_segments, timer.elapsedMilliseconds()); + response->clear_error(); response->set_has_remaining(has_remaining); if (compacted_start_key != std::nullopt)