Skip to content

Commit 53572ce

Browse files
Copilotmakr-code
andauthored
Fix RocksDB DB Open API usage in wiki index cache
Co-authored-by: makr-code <150588092+makr-code@users.noreply.github.com>
1 parent 357b96a commit 53572ce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/rag/wiki_index_store.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,15 @@ struct WikiIndexStore::Impl {
320320
{"embedding_cache", rocksdb::ColumnFamilyOptions{}}
321321
};
322322
std::vector<rocksdb::ColumnFamilyHandle*> cf_handles;
323-
std::unique_ptr<rocksdb::DB> raw_db;
323+
rocksdb::DB* raw_db = nullptr;
324324
const rocksdb::Status s = rocksdb::DB::Open(
325325
opts, config.cache_dir, cf_descs, &cf_handles, &raw_db);
326326
if (!s.ok()) {
327327
THEMIS_WARN("WikiIndexStore: failed to open RocksDB cache at '{}': {}",
328328
config.cache_dir, s.ToString());
329329
return false;
330330
}
331-
cache_db = raw_db.release();
331+
cache_db = raw_db;
332332
// cf_handles[0] = default CF (not used); cf_handles[1] = embedding_cache.
333333
if (cf_handles.size() >= 2) {
334334
cache_cf = cf_handles[1];

0 commit comments

Comments
 (0)