lordcheng10 commented on code in PR #17753:
URL: https://github.com/apache/pulsar/pull/17753#discussion_r987701202
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -3473,7 +3473,17 @@ public PositionImpl getNextValidPosition(final
PositionImpl position) {
}
return next;
}
-
+ public PositionImpl getValidPositionAfterSkippedEntries(final PositionImpl
position, int skippedEntryNum) {
+ PositionImpl skippedPosition =
position.getPositionAfterEntries(skippedEntryNum);
+ while (!isValidPosition(skippedPosition)) {
Review Comment:
@Jason918 PTAL,thanks!
The two methods are different.
The getValidPositionAfterSkippedEntries method skips multiple messages at a
time, while the getNextValidPosition method skips only one message at a time:
<img width="1040" alt="image"
src="https://user-images.githubusercontent.com/19296967/194024559-2b5f6418-f56f-476e-9636-040d4ab7007c.png">
--
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]