Why cursor.asyncReadEntriesOrWait() use topic.getMaxReadPosition() #21223
Unanswered
3286360470
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
In org.apache.pulsar.broker.service.persistent.PersistentDispatcherMultipleConsumers#readMoreEntries()
There is a line of code:
cursor.asyncReadEntriesOrWait(messagesToRead, bytesToRead, this, ReadType.Normal, topic.getMaxReadPosition());
Thre're is one question is why the position returned by the topic.getMaxReadPosition() is returned from the TransactionBuffer instead of directly using the last add confirmed position of the ledger.
And the TransactionBuffer recover from the broker starting, But sometimes TransactionBufferRecover fails, causing the state to remain in the Initializing state, so it may cause broker dispach messages to consume blocked.
All reactions