From 9b4c75ab3666838b8e3517dc0b404d10b15efb55 Mon Sep 17 00:00:00 2001 From: "Karthick Ariyaratnam (A)" Date: Mon, 25 Sep 2023 16:54:09 -0400 Subject: [PATCH] Fix a bug where flash CF options are being reset to default after flushall. --- src/storage/rocksdb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/storage/rocksdb.cpp b/src/storage/rocksdb.cpp index 76eaa133a..6d05d69b3 100644 --- a/src/storage/rocksdb.cpp +++ b/src/storage/rocksdb.cpp @@ -144,11 +144,12 @@ void RocksDBStorageProvider::retrieve(const char *key, size_t cchKey, callbackSi size_t RocksDBStorageProvider::clear() { size_t celem = count(); + auto options = m_spdb->GetOptions(m_spcolfamily.get()); auto status = m_spdb->DropColumnFamily(m_spcolfamily.get()); auto strName = m_spcolfamily->GetName(); rocksdb::ColumnFamilyHandle *handle = nullptr; - rocksdb::ColumnFamilyOptions cf_options(m_pfactory->RocksDbOptions()); + rocksdb::ColumnFamilyOptions cf_options(options); m_spdb->CreateColumnFamily(cf_options, strName, &handle); m_spcolfamily = std::shared_ptr(handle);