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

   ## Description
   
   ### Problem
   
   Subscription WAL retention only considered committed progress. Committed 
progress can advance on another consumer or replica while a local subscription 
queue is still replaying older WAL entries, allowing WAL deletion to pass the 
queue's unread replay cursor.
   
   ### Changes
   
   - Retain WAL from the earlier of the committed-progress boundary and the 
local replay cursor.
   - Pass the generalized queue retention boundary through the subscription 
queue registry and retention calculator.
   - Add a regression test covering committed progress ahead of the replay 
cursor.
   
   ### Verification
   
   - `mvnw.cmd spotless:apply -pl iotdb-core/consensus,iotdb-core/datanode`
   - `mvnw.cmd -nsu test -pl iotdb-core/datanode -am 
-Dtest=ConsensusPrefetchingQueueTest#testReplayCursorBoundsWalRetentionWhenCommittedProgressIsAhead
 -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false`
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added comments explaining the intent where it is not obvious.
   - [x] added a unit test covering the new code path.
   
   <hr>
   
   ##### Key changed classes
   
   - `ConsensusPrefetchingQueue`
   - `SubscriptionQueueRegistry`
   - `SubscriptionWalRetentionCalculator`
   - `IoTConsensusServerImpl`
   


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