Skip to content

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

Add shared lock for store delete range.

Kishore Nallan8a751daa891a
diff --git a/include/store.h b/include/store.h
index e01e4090..63f8a392 100644
--- a/include/store.h
+++ b/include/store.h
@@ -334,6 +334,7 @@ public:
}
rocksdb::Status delete_range(const std::string& begin_key, const std::string& end_key) {
+ std::shared_lock lock(mutex);
return db->DeleteRange(rocksdb::WriteOptions(), db->DefaultColumnFamily(), begin_key, end_key);
}