mirror of
https://github.com/ceph/ceph
synced 2024-12-16 16:39:21 +00:00
Merge pull request #10102 from liewegas/wip-mon-nosnap
mon/MonitorDBStore: do not use snapshot iterator; close on close Reviewed-by: Greg Farnum <gfarnum@redhat.com> Reviewed-by: Joao Eduardo Luis <joao@suse.de> Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
fb3a34ba93
@ -482,7 +482,7 @@ class MonitorDBStore
|
||||
Synchronizer get_synchronizer(pair<string,string> &key,
|
||||
set<string> &prefixes) {
|
||||
KeyValueDB::WholeSpaceIterator iter;
|
||||
iter = db->get_snapshot_iterator();
|
||||
iter = db->get_iterator();
|
||||
|
||||
if (!key.first.empty() && !key.second.empty())
|
||||
iter->upper_bound(key.first, key.second);
|
||||
@ -496,14 +496,14 @@ class MonitorDBStore
|
||||
|
||||
KeyValueDB::Iterator get_iterator(const string &prefix) {
|
||||
assert(!prefix.empty());
|
||||
KeyValueDB::Iterator iter = db->get_snapshot_iterator(prefix);
|
||||
KeyValueDB::Iterator iter = db->get_iterator(prefix);
|
||||
iter->seek_to_first();
|
||||
return iter;
|
||||
}
|
||||
|
||||
KeyValueDB::WholeSpaceIterator get_iterator() {
|
||||
KeyValueDB::WholeSpaceIterator iter;
|
||||
iter = db->get_snapshot_iterator();
|
||||
iter = db->get_iterator();
|
||||
iter->seek_to_first();
|
||||
return iter;
|
||||
}
|
||||
@ -662,6 +662,7 @@ class MonitorDBStore
|
||||
// there should be no work queued!
|
||||
io_work.stop();
|
||||
is_open = false;
|
||||
db.reset(NULL);
|
||||
}
|
||||
|
||||
void compact() {
|
||||
|
Loading…
Reference in New Issue
Block a user