From 9fc4e4f33761d8f2cab102de412e15387ca944d7 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 5 Jul 2013 12:29:36 -0700 Subject: [PATCH] mon/MonitorDBStore: drop unused single prefix synchronizer Signed-off-by: Sage Weil --- src/mon/MonitorDBStore.h | 55 ---------------------------------------- 1 file changed, 55 deletions(-) diff --git a/src/mon/MonitorDBStore.h b/src/mon/MonitorDBStore.h index cb860b15a9fc5..60a648de19b1b 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); -- 2.39.5