diff --git a/HISTORY.md b/HISTORY.md index 18bd1ce967..2b51f51146 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -9,8 +9,10 @@ Based on RocksDB 8.6.7 ### Enhancements * Added a kUseBaseAddress flag and GetBaseOffset flag to OptionTypeInfo. If this flag is set and a function is used for processing options, the function is passed the base address of the struct rather than the specific field (#397) +* Export GetFlushReasonString/GetCompactionReasonString in listener.h (#785). * Enabled speedb features in C and Java (#722) + ### Bug Fixes * Stall deadlock consists small cfs (#637). * Proactive Flushes: Fix a race in the ShouldInitiateAnotherFlushMemOnly that may cause the method to return an incorrect answer (#758). diff --git a/include/rocksdb/listener.h b/include/rocksdb/listener.h index c80c56c748..b5b321a237 100644 --- a/include/rocksdb/listener.h +++ b/include/rocksdb/listener.h @@ -175,6 +175,8 @@ enum class CompactionReason : int { kNumOfReasons, }; +const char* GetCompactionReasonString(CompactionReason compaction_reason); + // When adding flush reason, make sure to also update `GetFlushReasonString()`. enum class FlushReason : int { kOthers = 0x00, @@ -198,6 +200,8 @@ enum class FlushReason : int { kWriteBufferManagerInitiated = 0xf }; +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