]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cleanup in_prefix function 3957/head
authorxinxin shu <xinxin.shu@intel.com>
Wed, 11 Mar 2015 01:43:04 +0000 (09:43 +0800)
committerxinxin shu <xinxin.shu@intel.com>
Wed, 11 Mar 2015 01:43:04 +0000 (09:43 +0800)
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
src/os/LevelDBStore.h
src/os/RocksDBStore.cc
src/os/RocksDBStore.h

index 4617c5ca29a8e5b5e680d26afadc50cccaeca2a4..0eedcb38e481772865e4d00468874a32ab0b6ca8 100644 (file)
@@ -302,10 +302,6 @@ public:
   static string combine_strings(const string &prefix, const string &value);
   static int split_key(leveldb::Slice in, string *prefix, string *key);
   static bufferlist to_bufferlist(leveldb::Slice in);
-  static bool in_prefix(const string &prefix, leveldb::Slice key) {
-    return (key.compare(leveldb::Slice(past_prefix(prefix))) < 0) &&
-      (key.compare(leveldb::Slice(prefix)) > 0);
-  }
   static string past_prefix(const string &prefix) {
     string limit = prefix;
     limit.push_back(1);
index 4a45a15b2422bd5404aa5340650ce4e7ef112d2a..dc5e8e6f22ebaa81de92575d879380853f52f8db 100644 (file)
@@ -470,11 +470,6 @@ int RocksDBStore::RocksDBWholeSpaceIteratorImpl::status()
   return dbiter->status().ok() ? 0 : -1;
 }
 
-bool RocksDBStore::in_prefix(const string &prefix, rocksdb::Slice key)
-{
-  return (key.compare(rocksdb::Slice(past_prefix(prefix))) < 0) &&
-    (key.compare(rocksdb::Slice(prefix)) > 0);
-}
 string RocksDBStore::past_prefix(const string &prefix)
 {
   string limit = prefix;
index 5c3160f5c99a4754b46846f24bd09c8fd806c969..87c59de8cbd6460cbb973c5f76f47854865b16a4 100644 (file)
@@ -253,7 +253,6 @@ public:
   static string combine_strings(const string &prefix, const string &value);
   static int split_key(rocksdb::Slice in, string *prefix, string *key);
   static bufferlist to_bufferlist(rocksdb::Slice in);
-  static bool in_prefix(const string &prefix, rocksdb::Slice key);
   static string past_prefix(const string &prefix);
 
   virtual uint64_t get_estimated_size(map<string,uint64_t> &extra) {