congbobo184 commented on a change in pull request #9490:
URL: https://github.com/apache/pulsar/pull/9490#discussion_r571601948
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/TopicTransactionBuffer.java
##########
@@ -48,8 +68,71 @@
private final LinkedMap<TxnID, PositionImpl> aborts = new LinkedMap<>();
+ private final
CompletableFuture<SystemTopicClient.Writer<TransactionBufferSnapshot>>
takeSnapshotWriter;
+
+ // when add abort or change max read position, the count will +1. Take
snapshot will set 0 into it.
+ private final AtomicLong changeMaxReadPositionAndAddAbortTimes = new
AtomicLong();
+
+ private final Timer timer;
+
+ private final int takeSnapshotIntervalNumber;
+
+ private final int takeSnapshotIntervalTime;
+
public TopicTransactionBuffer(PersistentTopic topic) {
+ super(State.None);
this.topic = topic;
+ this.changeToInitializingState();
Review comment:
thanks. i will move it to recover method
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]