lordcheng10 commented on code in PR #17751:
URL: https://github.com/apache/pulsar/pull/17751#discussion_r981256695


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java:
##########
@@ -109,6 +109,16 @@ public void readEntriesFailed(ManagedLedgerException 
exception, Object ctx) {
                 recycle();
                 return;
             }
+            final ManagedLedgerImpl ledger = (ManagedLedgerImpl) 
cursor.getManagedLedger();
+            List<Entry> skippedEntries = new ArrayList<>();
+            PositionImpl startPosition = readPosition;
+            PositionImpl endPosition = (PositionImpl) nexReadPosition;
+            while (startPosition.compareTo(endPosition) < 0) {
+                
skippedEntries.add(EntryImpl.createSkippedEntry(startPosition.ledgerId, 
startPosition.entryId));
+                startPosition = ledger.getNextValidPosition(startPosition);

Review Comment:
   > It seems, normally, it will just goes from readPosition to nexReadPosition?
   
   YES
   
   > Will you miss other entries to be acked?
   
   IMO, won't miss other entries to be acked
   
   



-- 
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]

Reply via email to