gaoran10 commented on a change in pull request #12758:
URL: https://github.com/apache/pulsar/pull/12758#discussion_r747943032
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/TopicTransactionBuffer.java
##########
@@ -537,10 +537,11 @@ public void run() {
try {
boolean hasSnapshot = false;
while (reader.hasMoreEvents()) {
- hasSnapshot = true;
Message<TransactionBufferSnapshot> message =
reader.readNext();
TransactionBufferSnapshot transactionBufferSnapshot =
message.getValue();
- if
(topic.getName().equals(transactionBufferSnapshot.getTopicName())) {
+ if (transactionBufferSnapshot != null
Review comment:
Could we use the key of the message to verify the message belong to this
topic? Then we could reduce some deserialization works.
--
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]