From: Sage Weil Date: Tue, 10 Dec 2013 16:56:35 +0000 (-0800) Subject: os/MemStore: do on_apply_sync callback synchronously X-Git-Tag: v0.74~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=faaf5463033c8547a4be952c68a8b76882e39c42;p=ceph.git os/MemStore: do on_apply_sync callback synchronously We can easily deadlock if we put this in the Finisher thread behind other work; do it synchronously! Signed-off-by: Sage Weil Reviewed-by: Yehuda Sadeh --- diff --git a/src/os/MemStore.cc b/src/os/MemStore.cc index 063ae2417cee..fdf3ee5bcf70 100644 --- a/src/os/MemStore.cc +++ b/src/os/MemStore.cc @@ -651,10 +651,10 @@ int MemStore::queue_transactions(Sequencer *osr, Context *on_apply = NULL, *on_apply_sync = NULL, *on_commit = NULL; ObjectStore::Transaction::collect_contexts(tls, &on_apply, &on_commit, &on_apply_sync); + if (on_apply_sync) + on_apply_sync->complete(0); if (on_apply) finisher.queue(on_apply); - if (on_apply_sync) - finisher.queue(on_apply_sync); if (on_commit) finisher.queue(on_commit); return 0;