txc->log_state_latency(logger, l_bluestore_state_prepare_lat);
if (txc->ioc.has_pending_aios()) {
txc->state = TransContext::STATE_AIO_WAIT;
+ txc->had_ios = true;
_txc_aio_submit(txc);
return;
}
case TransContext::STATE_IO_DONE:
//assert(txc->osr->qlock.is_locked()); // see _txc_finish_io
+ if (txc->had_ios) {
+ ++txc->osr->txc_with_unstable_io;
+ }
txc->log_state_latency(logger, l_bluestore_state_io_done_lat);
txc->state = TransContext::STATE_KV_QUEUED;
for (auto& sb : txc->shared_blobs_written) {
}
for (auto txc : kv_committing) {
_txc_release_alloc(txc);
+ if (txc->had_ios) {
+ --txc->osr->txc_with_unstable_io;
+ }
}
vector<bluestore_pextent_t> bluefs_gift_extents;
IOContext ioc;
+ bool had_ios = false; ///< true if we submitted IOs before our kv txn
CollectionRef first_collection; ///< first referenced collection
uint64_t last_seq = 0;
+ std::atomic_int txc_with_unstable_io = {0}; ///< num txcs with unstable io
+
std::atomic_int kv_committing_serially = {0};
OpSequencer()