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

   Closing the last consumer currently deletes its group's checkpoints even 
when the topic has `retain.progress.after.unsubscribe=true`. Recreating the 
group can then start at the WAL tail and skip data written while the group was 
offline. A delayed asynchronous queue close can also recreate detached WAL 
retention after retention was disabled, the topic was dropped, or a replacement 
queue was registered.
   
   This change preserves configured checkpoints and the empty group's 
incarnation and SQL dialect on ConfigNode and DataNode, so resubscription can 
resume correctly. Empty table groups encode their dialect using a negative 
empty-consumer count, preserving the existing serialized field boundaries. 
Disabling retention or dropping the topic still clears retained progress and 
prunes empty ConfigNode groups once no checkpoints remain.
   
   WAL retention registration now tracks the owning queue. Delayed closes 
unregister the old queue but cannot restore a canceled or superseded detached 
registration.
   
   Validation:
   
   - 88 targeted unit tests passed, covering group serialization, selective 
checkpoint cleanup, snapshots/rejoin in both data models, and deterministic 
asynchronous-close races.
   - Full English reactor `test-compile` passed.
   - The new 
`IoTDBConsensusSubscriptionBasicTableIT#testLastConsumerCloseRetainsProgress` 
passed on 1 ConfigNode + 1 DataNode with IoTConsensus, covering both direct 
close and unsubscribe-then-close, followed by consumption of offline writes 
without seek. Subscription was enabled only in temporary test artifacts because 
the community edition disables it at compile time.
   - Spotless and `git diff --check` passed.
   


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