Skip to content

Commit

Permalink
Revert "Issue apache#1791: Read Submission should bypass OSE Threads"
Browse files Browse the repository at this point in the history
This reverts commit 6b99ff7.
  • Loading branch information
nicoloboschi committed Mar 14, 2022
1 parent 5191bb5 commit accdd91
Showing 1 changed file with 1 addition and 8 deletions.
Expand Up @@ -887,14 +887,7 @@ CompletableFuture<LedgerEntries> readEntriesInternalAsync(long firstEntry,
ws.recycle();
}

if (isHandleWritable()) {
// Ledger handle in read/write mode: submit to OSE for ordered execution.
clientCtx.getMainWorkerPool().executeOrdered(ledgerId, op);
} else {
// Read-only ledger handle: bypass OSE and execute read directly in client thread.
// This avoids a context-switch to OSE thread and thus reduces latency.
op.run();
}
clientCtx.getMainWorkerPool().executeOrdered(ledgerId, op);
} else {
op.future().completeExceptionally(BKException.create(ClientClosedException));
}
Expand Down

0 comments on commit accdd91

Please sign in to comment.