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

   ## Description
   
   ### Match the actual compaction source files
   
   - Match queued PipeTsFileInsertionEvents by normalized original TsFile paths 
instead of only comparing event counts.
   - Keep using the TsFileResource path for matching after an event has created 
a hard link in its pipe directory.
   - Leave unrelated queued events untouched, even when they share the same 
committer key.
   
   ### Make queue replacement atomic
   
   - Synchronize TsFile deque offer, poll, inspection, discard, and replacement 
operations on the same queue monitor.
   - Acquire references for all replacement events before swapping the queue 
entries, then release the replaced source events.
   - Prevent consumers from polling source events between the replacement 
snapshot and mutation.
   
   ### Tests
   
   - Verify an unrelated event remains queued when a compaction source is 
replaced.
   - Verify equal event counts with different source paths do not trigger 
replacement.
   - Verify polling waits while a replacement snapshot is in progress.
   
   The focused unit test suite passes with 3 tests, 0 failures, and 0 errors.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
       - [x] concurrent read and write
   - [x] added Javadocs for the new source-file accessor.
   - [x] added comments explaining the replacement synchronization intent.
   - [x] added unit tests to cover the corrected code paths.
   
   <hr>
   
   ##### Key changed/added classes in this PR
   
   - PipeRealtimePriorityBlockingQueue
   - PipeTsFileInsertionEvent
   - PipeRealtimePriorityBlockingQueueTest
   


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