liangyepianzhou commented on a change in pull request #12449:
URL: https://github.com/apache/pulsar/pull/12449#discussion_r741796368
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -1848,8 +1851,10 @@ public void asyncReadEntry(PositionImpl position,
ReadEntryCallback callback, Ob
}
private void internalReadFromLedger(ReadHandle ledger, OpReadEntry
opReadEntry) {
-
- if (opReadEntry.readPosition.compareTo(opReadEntry.maxPosition) > 0) {
+ //entries that has been offloaded do not need to be restricted by
TransactionBuffer`maxReadPosition
+ LedgerInfo info = ledgers.get(ledger.getId());
+ if (opReadEntry.readPosition.compareTo(opReadEntry.maxPosition) > 0
Review comment:
We don’t know if the messages after MaxReadPosition are aborted.
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -1870,7 +1875,9 @@ private void internalReadFromLedger(ReadHandle ledger,
OpReadEntry opReadEntry)
// can read max position entryId
if (ledger.getId() == opReadEntry.maxPosition.getLedgerId()) {
- lastEntryInLedger = min(opReadEntry.maxPosition.getEntryId(),
lastEntryInLedger);
+ if(!info.getOffloadContext().getComplete()){
Review comment:
If no transaction message has been sent, then MaxReadPosition does not
need to be considered when recovering from tiered storage.
--
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]