]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/kv/RocksDBStore.h
update sources to 12.2.2
[ceph.git] / ceph / src / kv / RocksDBStore.h
index 4d25408a5f00405afa03538db0017162c26d1fc8..44c99e1b2e9d59b6ec8aaeb48735e09afaace8d3 100644 (file)
@@ -75,6 +75,9 @@ class RocksDBStore : public KeyValueDB {
   rocksdb::BlockBasedTableOptions bbt_opts;
   string options_str;
 
+  uint64_t cache_size = 0;
+  bool set_cache_flag = false;
+
   int do_open(ostream &out, bool create_if_missing);
 
   // manage async compactions
@@ -105,8 +108,8 @@ public:
   bool enable_rmrange;
   void compact() override;
 
-  int tryInterpret(const string key, const string val, rocksdb::Options &opt);
-  int ParseOptionsFromString(const string opt_str, rocksdb::Options &opt);
+  int tryInterpret(const string& key, const string& val, rocksdb::Options &opt);
+  int ParseOptionsFromString(const string& opt_str, rocksdb::Options &opt);
   static int _test_init(const string& dir);
   int init(string options_str) override;
   /// compact rocksdb for all keys with a given prefix
@@ -155,6 +158,11 @@ public:
   void split_stats(const std::string &s, char delim, std::vector<std::string> &elems);
   void get_statistics(Formatter *f) override;
 
+  PerfCounters *get_perf_counters() override
+  {
+    return logger;
+  }
+
   struct  RocksWBHandler: public rocksdb::WriteBatch::Handler {
     std::string seen ;
     int num_seen = 0;
@@ -435,6 +443,11 @@ err:
     return total_size;
   }
 
+  int set_cache_size(uint64_t s) override {
+    cache_size = s;
+    set_cache_flag = true;
+    return 0;
+  }
 
 protected:
   WholeSpaceIterator _get_iterator() override;