From 3960962ca4e55ec89e989dd73897066fbb7a97d4 Mon Sep 17 00:00:00 2001 From: Changyu Bi Date: Thu, 28 Sep 2023 16:10:59 -0700 Subject: [PATCH] Update definition for `GetCompactionReasonString` Summary: `GetCompactionReasonString()` will be exposed in RocksDB 8.7, which includes PR https://github.com/facebook/rocksdb/pull/11778 that exposes it. So update its definition here to be based on RocksDB version. Differential Revision: D49755853 fbshipit-source-id: 1ff11f6708768b0039f88835e44272f525798ba2 --- storage/rocksdb/rdb_i_s.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/rocksdb/rdb_i_s.cc b/storage/rocksdb/rdb_i_s.cc index 85fca144790c..77b7d847a30b 100644 --- a/storage/rocksdb/rdb_i_s.cc +++ b/storage/rocksdb/rdb_i_s.cc @@ -932,6 +932,7 @@ static int rdb_i_s_compact_stats_fill_table( DBUG_RETURN(ret); } +#if ROCKSDB_MAJOR < 8 || (ROCKSDB_MAJOR == 8 && ROCKSDB_MINOR < 7) namespace { using rocksdb::CompactionReason; @@ -982,6 +983,7 @@ const char *GetCompactionReasonString(CompactionReason compaction_reason) { } } // anonymous namespace +#endif /* Support for INFORMATION_SCHEMA.ROCKSDB_ACTIVE_COMPACTION_STATS dynamic table