Skip to content

Commit b0f5e10

Browse files
committed
crimson/osd/pg: also trigger callbacks for empty peering transactions
Signed-off-by: Xuehan Xu <[email protected]>
1 parent ec2af67 commit b0f5e10

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/crimson/osd/shard_services.cc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -767,14 +767,20 @@ seastar::future<> ShardServices::dispatch_context_transaction(
767767
LOG_PREFIX(OSDSingletonState::dispatch_context_transaction);
768768
if (ctx.transaction.empty()) {
769769
DEBUG("empty transaction");
770-
return seastar::now();
770+
co_await get_store().flush(col);
771+
Context* on_commit(
772+
ceph::os::Transaction::collect_all_contexts(ctx.transaction));
773+
if (on_commit) {
774+
on_commit->complete(0);
775+
}
776+
co_return;
771777
}
772778

773779
DEBUG("do_transaction ...");
774-
auto ret = get_store().do_transaction(
780+
co_await get_store().do_transaction(
775781
col,
776782
ctx.transaction.claim_and_reset());
777-
return ret;
783+
co_return;
778784
}
779785

780786
seastar::future<> ShardServices::dispatch_context_messages(

0 commit comments

Comments
 (0)