JackieTien97 opened a new pull request, #18840:
URL: https://github.com/apache/iotdb/pull/18840

   ## Description
   
   Backport #18834 to `dev/1.3` (cherry-picked from 
b0b96f61f624cb246750925832ac3b5029c473d8).
   
   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.
     ```sh
     mvn clean test -pl iotdb-core/datanode -am \
       -Dtest=MemoryPoolTest,SharedTsBlockQueueTest \
       -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false
     ```
   - Spotless and `git diff --check` passed.
   
   ## Checklist
   
   - [x] Self-reviewed concurrent registration and deregistration.
   - [x] Preserved the explanation of the identity check.
   - [x] Backported and ran the regression tests.
   
   ### Key changed classes
   
   - `MemoryPool`
   - `MemoryPoolTest`
   


-- 
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]

Reply via email to