Skip to content

[To dev/1.3] Preserve query memory registrations during stale fragment cleanup - #18840

Merged
JackieTien97 merged 1 commit into
dev/1.3from
codex/cp-pr-18834-dev-1.3
Oct 13, 2026
Merged

JackieTien97 merged 1 commit into
dev/1.3from
codex/cp-pr-18834-dev-1.3

Conversation

@JackieTien97

Copy link
Copy Markdown
Contributor

Description

Backport #18834 to dev/1.3 (cherry-picked from b0b96f6).

A delayed fragment cleanup can delete a replacement query-memory registration, causing MemoryPool.free() to fail when buffered results are consumed. Check that the outer entry still references the map being cleaned up before removing it, under the existing registration lock.

Preserve all five regression tests from the original PR, including the deterministic concurrent cleanup test. The only backport adaptation is resolving the test import difference with dev/1.3.

Validation

  • Clean DataNode reactor build and focused unit tests passed: MemoryPoolTest (27 tests), SharedTsBlockQueueTest (2 tests); no failures, errors, or skips.
    mvn clean test -pl iotdb-core/datanode -am \
      -Dtest=MemoryPoolTest,SharedTsBlockQueueTest \
      -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false
  • Spotless and git diff --check passed.

Checklist

  • Self-reviewed concurrent registration and deregistration.
  • Preserved the explanation of the identity check.
  • Backported and ran the regression tests.

Key changed classes

  • MemoryPool
  • MemoryPoolTest

@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.43%. Comparing base (3f9a0de) to head (4f2243a).

Additional details and impacted files
@@              Coverage Diff              @@
##             dev/1.3   #18840      +/-   ##
=============================================
+ Coverage      45.40%   45.43%   +0.02%     
  Complexity       198      198              
=============================================
  Files           3667     3667              
  Lines         251095   251096       +1     
  Branches       31088    31089       +1     
=============================================
+ Hits          114013   114076      +63     
+ Misses        137082   137020      -62     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JackieTien97
JackieTien97 merged commit c056ce6 into dev/1.3 Oct 13, 2026
16 of 17 checks passed
@JackieTien97
JackieTien97 deleted the codex/cp-pr-18834-dev-1.3 branch October 13, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant