Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
[fix][broker] Make sure all inflight writes have finished before comp…
Browse files Browse the repository at this point in the history
…letion of compaction (apache#21067)

(cherry picked from commit bb9c9b4)
  • Loading branch information
coderzc committed Aug 29, 2023
1 parent a5d1ca0 commit 810a2f0
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ private void phaseTwoLoop(RawReader reader, MessageId to, Map<String, MessageId>
}
});
if (to.equals(id)) {
// make sure all inflight writes have finished
outstanding.acquire(MAX_OUTSTANDING);
addFuture.whenComplete((res, exception2) -> {
if (exception2 == null) {
promise.complete(null);
Expand Down

0 comments on commit 810a2f0

Please sign in to comment.