From: Sage Weil Date: Fri, 5 Jul 2013 19:29:36 +0000 (-0700) Subject: mon/MonitorDBStore: drop unused single prefix synchronizer X-Git-Tag: v0.67-rc1~126^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9fc4e4f33761d8f2cab102de412e15387ca944d7;p=ceph.git mon/MonitorDBStore: drop unused single prefix synchronizer Signed-off-by: Sage Weil --- diff --git a/src/mon/MonitorDBStore.h b/src/mon/MonitorDBStore.h index cb860b15a9f..60a648de19b 100644 --- a/src/mon/MonitorDBStore.h +++ b/src/mon/MonitorDBStore.h @@ -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 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 &key, set &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( - new SinglePrefixStoreIteratorImpl(iter, prefix) - ); - } - KeyValueDB::Iterator get_iterator(const string &prefix) { assert(!prefix.empty()); KeyValueDB::Iterator iter = db->get_snapshot_iterator(prefix);