oneby-wang commented on code in PR #25117:
URL: https://github.com/apache/pulsar/pull/25117#discussion_r2672172500
##########
managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerTest.java:
##########
@@ -5144,20 +5158,23 @@ public void markDeleteFailed(ManagedLedgerException
exception, Object ctx) {
}, null);
latch.await();
- assertEquals(cursor.getPersistentMarkDeletedPosition(), lastPosition);
- assertEquals(ledger.getCursors().getSlowestCursorPosition(),
lastPosition);
- assertEquals(cursor.getProperties(), properties);
+
assertThat(cursor.getPersistentMarkDeletedPosition()).isGreaterThanOrEqualTo(lastPosition);
+
assertThat(ledger.getCursors().getSlowestCursorPosition()).isGreaterThanOrEqualTo(lastPosition);
+ // cursor.asyncMarkDelete() and
maybeUpdateCursorBeforeTrimmingConsumedLedger may run concurrently,
+ // so we can't assert properties equals here.
+ // assertEquals(cursor.getProperties(), properties);
Review Comment:
https://github.com/apache/pulsar/pull/25110 also has race condition
mentioned by
https://github.com/apache/pulsar/pull/25117#issuecomment-3723599827.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]