From f0446a891906b83f6f5dbbb308f530bd02092459 Mon Sep 17 00:00:00 2001 From: git-hulk Date: Thu, 7 Sep 2023 19:23:42 +0800 Subject: [PATCH] Export GetCompactionReasonString/GetFlushReasonString by moving them into listener.h --- include/rocksdb/listener.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/rocksdb/listener.h b/include/rocksdb/listener.h index 3c8793e069..c2bff80e33 100644 --- a/include/rocksdb/listener.h +++ b/include/rocksdb/listener.h @@ -161,6 +161,8 @@ enum class CompactionReason : int { kNumOfReasons, }; +const char* GetCompactionReasonString(CompactionReason compaction_reason); + enum class FlushReason : int { kOthers = 0x00, kGetLiveFiles = 0x01, @@ -181,6 +183,8 @@ enum class FlushReason : int { kWriteBufferManagerInitiated = 0xe, }; +const char* GetFlushReasonString(FlushReason flush_reason); + // TODO: In the future, BackgroundErrorReason will only be used to indicate // why the BG Error is happening (e.g., flush, compaction). We may introduce // other data structure to indicate other essential information such as