{
dout(20) << __func__ << " txc " << txc << dendl;
+ for (auto ls : { &txc->onodes, &txc->modified_objects }) {
+ for (auto& o : *ls) {
+ std::lock_guard<std::mutex> l(o->flush_lock);
+ dout(20) << __func__ << " onode " << o << " had " << o->flush_txns
+ << dendl;
+ assert(o->flush_txns.count(txc));
+ o->flush_txns.erase(txc);
+ o->flushing_count--;
+ if (o->flush_txns.empty()) {
+ o->flush_cond.notify_all();
+ }
+ }
+ ls->clear(); // clear out refs
+ }
+
// warning: we're calling onreadable_sync inside the sequencer lock
if (txc->onreadable_sync) {
txc->onreadable_sync->complete(0);
}
txc->shared_blobs_written.clear();
- for (auto ls : { &txc->onodes, &txc->modified_objects }) {
- for (auto& o : *ls) {
- std::lock_guard<std::mutex> l(o->flush_lock);
- dout(20) << __func__ << " onode " << o << " had " << o->flush_txns
- << dendl;
- assert(o->flush_txns.count(txc));
- o->flush_txns.erase(txc);
- o->flushing_count--;
- if (o->flush_txns.empty()) {
- o->flush_cond.notify_all();
- }
- }
- ls->clear(); // clear out refs
- }
-
while (!txc->removed_collections.empty()) {
_queue_reap_collection(txc->removed_collections.front());
txc->removed_collections.pop_front();
ExtentMap extent_map;
+ // track txc's that have not been committed to kv store (and whose
+ // effects cannot be read via the kvdb read methods)
std::atomic<int> flushing_count = {0};
std::mutex flush_lock; ///< protect flush_txns
- std::condition_variable flush_cond; ///< wait here for unapplied txns
- set<TransContext*> flush_txns; ///< committing or deferred txns
+ std::condition_variable flush_cond; ///< wait here for uncommitted txns
+ set<TransContext*> flush_txns; ///< unapplied txns
Onode(Collection *c, const ghobject_t& o,
const mempool::bluestore_meta_other::string& k)