Caideyipi commented on code in PR #18866:
URL: https://github.com/apache/iotdb/pull/18866#discussion_r4269329685
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusPrefetchingQueue.java:
##########
@@ -195,6 +199,15 @@ public class ConsensusPrefetchingQueue {
private final Map<SubscriptionCommitContext, SubscriptionEvent>
outstandingEventsByCommitContext =
new ConcurrentHashMap<>();
+ /**
+ * Compact batch boundaries and source positions; no Tablet or serialized
response is retained.
+ */
+ private final Map<SubscriptionEvent, DeliveryBatchRecord> deliveryBatches =
+ new ConcurrentHashMap<>();
+
+ private final ConcurrentSkipListMap<Long, Integer> deliveryStartIndices =
+ new ConcurrentSkipListMap<>();
Review Comment:
Added the field comment. The key is the earliest local search index required
by a live batch (`Long.MIN_VALUE` for replicated entries without a local
index); the value counts live batches sharing that start. The smallest key pins
WAL retention, and cleanup removes it only after the last batch using it is
gone.
--
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]