Skip to content

Commit

Permalink
fix topic compaction is failed after compactedLedger being recover
Browse files Browse the repository at this point in the history
  • Loading branch information
fanjianye committed Nov 10, 2023
1 parent 51202a6 commit c6403ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private static CompletableFuture<MessageIdData> readOneMessageId(LedgerHandle lh

private static CompletableFuture<CompactedTopicContext> openCompactedLedger(BookKeeper bk, long id) {
CompletableFuture<LedgerHandle> promise = new CompletableFuture<>();
bk.asyncOpenLedger(id,
bk.asyncOpenLedgerNoRecovery(id,
Compactor.COMPACTED_TOPIC_LEDGER_DIGEST_TYPE,
Compactor.COMPACTED_TOPIC_LEDGER_PASSWORD,
(rc, ledger, ctx) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ public void testCompactWithConcurrentGetCompactionHorizonAndCompactedTopicContex
Thread.sleep(1500);
invocation.callRealMethod();
return null;
}).when(bk).asyncOpenLedger(Mockito.anyLong(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any());
}).when(bk).asyncOpenLedgerNoRecovery(Mockito.anyLong(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any());

LedgerHandle oldCompactedLedger = bk.createLedger(1, 1,
Compactor.COMPACTED_TOPIC_LEDGER_DIGEST_TYPE,
Expand Down

0 comments on commit c6403ce

Please sign in to comment.