poorbarcode commented on code in PR #24945:
URL: https://github.com/apache/pulsar/pull/24945#discussion_r2508548877
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/TopicTransactionBuffer.java:
##########
@@ -108,6 +106,9 @@ public class TopicTransactionBuffer extends
TopicTransactionBufferState implemen
private final AbortedTxnProcessor.SnapshotType snapshotType;
private final MaxReadPositionCallBack maxReadPositionCallBack;
+ private volatile CompletableFuture<Void> firstSnapshottingFuture = new
CompletableFuture<>();
+ /** if the first snapshot is in progress, it will pending following
publishing tasks. **/
+ private final LinkedList<PendingAppendingTxnBufferTask>
pendingAppendingTxnBufferTasks = new LinkedList<>();
Review Comment:
`ArrayList` will cause expansion and occupation of large blocks of memory,
and has no benefit on the use case here, so `LinkedList` is better
--
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]