horizonzy commented on code in PR #15098:
URL: https://github.com/apache/pulsar/pull/15098#discussion_r846771186
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -2230,9 +2236,8 @@ void updateCursor(ManagedCursorImpl cursor, PositionImpl
newPosition) {
PositionImpl startReadOperationOnLedger(PositionImpl position, OpReadEntry
opReadEntry) {
Long ledgerId = ledgers.ceilingKey(position.getLedgerId());
if (null == ledgerId) {
- opReadEntry.readEntriesFailed(new
ManagedLedgerException.NoMoreEntriesToReadException("The ceilingKey(K key"
- + ") method is used to return the least key greater than
or equal to the given key, "
- + "or null if there is no such key"), null);
+ opReadEntry.makeInvalid();
Review Comment:
location 1:
It's useless code, I remove it at #15104. So needn't check it.
location 2:
It's a wait opReadEntry, when opAddEntry completed, it will nofity wait
opReadEntry read again. The logicment is not conflict with this changes. And I
fix the bad behavior when wait opReadEntry read at #15104
--
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]