liangyepianzhou commented on a change in pull request #12386:
URL: https://github.com/apache/pulsar/pull/12386#discussion_r732002084
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/TopicTransactionBuffer.java
##########
@@ -455,9 +455,14 @@ public void
syncMaxReadPositionForNormalPublish(PositionImpl position) {
// when ongoing transaction is empty, proved that lastAddConfirm is
can read max position, because callback
// thread is the same tread, in this time the lastAddConfirm don't
content transaction message.
synchronized (TopicTransactionBuffer.this) {
- if (ongoingTxns.isEmpty()) {
+ if (checkIfNoSnapshot()) {
maxReadPosition = position;
changeMaxReadPositionAndAddAbortTimes.incrementAndGet();
+ } else if (checkIfReady()) {
Review comment:
The state of TB may be NoSnapshot and Ready after TC recovered
completely. We allow producer to send common messages and update
MaxReadPosition when the state is NoSnapshot .
--
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]