diff options
author | Sage Weil <sage@inktank.com> | 2013-07-26 21:43:07 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-27 08:20:41 -0700 |
commit | 0f7d5c0679ada3aaf9f3fe1d8a223a3e869b21e6 (patch) | |
tree | 15dd5adc167ef69f37cc34c940c76509be05de29 | |
parent | b5250fdc70119408b102091229ba8e10fa0b1446 (diff) | |
download | ceph-wip-5754.tar.gz |
assert deleted keys are gonewip-5754
-rw-r--r-- | src/mon/MonitorDBStore.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mon/MonitorDBStore.h b/src/mon/MonitorDBStore.h index 276620f7516..aec372032ed 100644 --- a/src/mon/MonitorDBStore.h +++ b/src/mon/MonitorDBStore.h @@ -230,6 +230,7 @@ class MonitorDBStore bl.write_fd(dump_fd); } + list<pair<string, string> > removed; list<pair<string, pair<string,string> > > compact; for (list<Op>::const_iterator it = t.ops.begin(); it != t.ops.end(); ++it) { const Op& op = *it; @@ -239,6 +240,7 @@ class MonitorDBStore break; case Transaction::OP_ERASE: dbt->rmkey(op.prefix, op.key); + removed.push_back(make_pair(op.prefix, op.key)); break; case Transaction::OP_COMPACT: compact.push_back(make_pair(op.prefix, make_pair(op.key, op.endkey))); @@ -259,6 +261,13 @@ class MonitorDBStore db->compact_range_async(compact.front().first, compact.front().second.first, compact.front().second.second); compact.pop_front(); } + + while (!removed.empty()) { + if (exists(removed.front().first, removed.front().second)) { + derr << __func__ << " removed key " << removed.front() << " did not go away" << dendl; + assert(0 == "wtf"); + } + } } return r; } |