Repository navigation
Conversation
jt2594838
approved these changes
Oct 15, 2026
2 tasks done
jt2594838
pushed a commit
that referenced
this pull request
Oct 16, 2026
#18893) (#18896) * Fence IoTConsensus applies before storage shutdown (#18841) * Fix queued IoTConsensus writes during shutdown * Test queued IoTConsensus writes across storage shutdown * Reproduce WAL checkpoint loss from writes after shutdown * Fence IoTConsensus applies before storage shutdown (cherry picked from commit 532d6c1) * Reuse DataRegion insert lock for IoTConsensus shutdown fencing (#18893) (cherry picked from commit d2b97bc)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow up to #18841. IoTConsensus shutdown fencing currently acquires an additional region read/write lock around every apply. Reuse
DataRegion.insertLockto check write admission and permanently close admission before storage and WAL shutdown. Memory backpressure and state-machine retry waits stay outside the insert lock.Write successful insertions' WAL separators before releasing the insert lock, preserving their subscription metadata. Table deletions continue to release the lock during sealed-file I/O. Shutdown waits on a condition from the same lock until admitted deletions finish, including separator emission on success; failed deletions also unblock shutdown. Remove the state-machine apply wrapper.
Validation
IoTConsensusShutdownTest,DataRegionTest,DataRegionStateMachineTest,WALNodeTest, andtestCompactionWithDeletionsDuringCompactionsin bothInnerSeqCompactionWithFastPerformerTestandInnerSeqCompactionWithReadChunkPerformerTest(74 tests, 0 failures/errors, 1 existing skip).mvn test-compile -DskipTestsandmvn test-compile -P with-zh-locale -DskipTests.mvn spotless:apply -pl iotdb-core/datanode.This PR has: