Repository navigation
Conversation
|
Caideyipi
left a comment
There was a problem hiding this comment.
Initial independent self-review for PR head d392b0b against master.
The complete diff and relevant subscription batch, segment-lock, and prefetch queue lifecycle paths were inspected. No actionable issues were found, and no fixes were needed. The ConcurrentHashMap change safely supports concurrent region-key snapshots while preserving the existing per-region locks.
Local verification: the newly added concurrency regression test was reported passing locally; it was not rerun during this review round. The local checkout remained master at 65ef92f; the confirmed remote PR head is d392b0b.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19116 +/- ##
============================================
- Coverage 48.29% 48.28% -0.01%
Complexity 625 625
============================================
Files 5572 5572
Lines 411719 411719
Branches 54229 54229
============================================
- Hits 198820 198798 -22
- Misses 212899 212921 +22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|




Summary
Subscription polling and batch emission copy
regionIdToBatch.keySet()while the prefetch path may structurally update the same map under per-region locks. A concurrent update can make the snapshot fail and abort polling.Use
ConcurrentHashMapfor region batch tracking while retaining the existing per-region locks for batch operations. Add a regression test that runs poll and emit snapshots alongside prefetch-style inserts and removals.Validation
mvn spotless:apply -P with-integration-tests -pl iotdb-core/datanodemvn -o -pl iotdb-core/datanode -am clean test -Dtest=SubscriptionPipeEventBatchesConcurrencyTest -Dsurefire.failIfNoSpecifiedTests=false(28 reactor modules; 1 test passed)