]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonitorDBStore: drop unused single prefix synchronizer
authorSage Weil <sage@inktank.com>
Fri, 5 Jul 2013 19:29:36 +0000 (12:29 -0700)
committerSage Weil <sage@inktank.com>
Tue, 9 Jul 2013 18:05:48 +0000 (11:05 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/MonitorDBStore.h

index cb860b15a9fc5e36be2593ff42c96fae971786dd..60a648de19b1b9af40c40ed7e6cf8905264ecd7e 100644 (file)
@@ -354,49 +354,6 @@ class MonitorDBStore
     }
   };
 
-  class SinglePrefixStoreIteratorImpl : public StoreIteratorImpl {
-    KeyValueDB::Iterator iter;
-    string prefix;
-
-  public:
-    SinglePrefixStoreIteratorImpl(KeyValueDB::Iterator iter, string prefix)
-      : StoreIteratorImpl(),
-       iter(iter),
-       prefix(prefix)
-    { }
-
-    virtual ~SinglePrefixStoreIteratorImpl() { }
-
-  private:
-    virtual void get_chunk_tx(Transaction &tx) {
-      assert(done == false);
-      assert(iter->valid() == true);
-
-      while (iter->valid()) {
-       string key(iter->key());
-       bufferlist value = iter->value();
-       if (!add_chunk_entry(tx, prefix, key, value))
-         return;
-       iter->next();
-      }
-      assert(iter->valid() == false);
-      done = true;
-    }
-
-    virtual pair<string,string> get_next_key() {
-      // this method is only used by scrub on the whole store
-      // iterator.  also, the single prefix iterator has been dropped
-      // in later code.  we leave this here only for the benefit of
-      // backporting.
-      assert(0 == "this should not get called");
-      return make_pair(string(), string());
-    }
-
-    virtual bool _is_valid() {
-      return iter->valid();
-    }
-  };
-
   Synchronizer get_synchronizer(pair<string,string> &key,
                                set<string> &prefixes) {
     KeyValueDB::WholeSpaceIterator iter;
@@ -412,18 +369,6 @@ class MonitorDBStore
     );
   }
 
-  Synchronizer get_synchronizer(string &prefix) {
-    assert(!prefix.empty());
-
-    KeyValueDB::Iterator iter;
-    iter = db->get_snapshot_iterator(prefix);
-    iter->seek_to_first();
-
-    return std::tr1::shared_ptr<StoreIteratorImpl>(
-       new SinglePrefixStoreIteratorImpl(iter, prefix)
-    );
-  }
-
   KeyValueDB::Iterator get_iterator(const string &prefix) {
     assert(!prefix.empty());
     KeyValueDB::Iterator iter = db->get_snapshot_iterator(prefix);