From 32cf5ac4c0d910b81e237879c46e6a63f3cb7a6b Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 24 Feb 2011 12:31:58 -0800 Subject: [PATCH] FileStore.h: reorder queue operations in _journaled_ahead In writeahead mode, an op could dissappear from jq without immediately reappearing in q. Thus, q can be empty before seq is requeued and finished. _journaled_ahead will now enqueue the op in q before removing from jq. Signed-off-by: Samuel Just --- src/os/FileStore.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index dd4181885dffd..2ee08ab1126d9 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -1664,13 +1664,14 @@ void FileStore::_journaled_ahead(OpSequencer *osr, uint64_t op, op_queue_throttle(); - osr->dequeue_journal(); // this should queue in order because the journal does it's completions in order. journal_lock.Lock(); queue_op(osr, op, tls, onreadable, onreadable_sync); journal_lock.Unlock(); + osr->dequeue_journal(); + // do ondisk completions async, to prevent any onreadable_sync completions // getting blocked behind an ondisk completion. if (ondisk) { -- 2.39.5