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 <samuel.just@dreamhost.com>
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) {