feat(load): route decoded tsfile pieces through consensus - #18432
Draft
luoluoyuyu wants to merge 4 commits into
Draft
feat(load): route decoded tsfile pieces through consensus#18432luoluoyuyu wants to merge 4 commits into
luoluoyuyu wants to merge 4 commits into
Conversation
luoluoyuyu
marked this pull request as draft
August 10, 2026 06:44
luoluoyuyu
force-pushed
the
load-tsfile-consensus-ha
branch
from
August 13, 2026 03:03
900bd81 to
6db4491
Compare
luoluoyuyu
force-pushed
the
load-tsfile-consensus-ha
branch
2 times, most recently
from
August 20, 2026 10:48
b34eee0 to
a17672e
Compare
luoluoyuyu
force-pushed
the
load-tsfile-consensus-ha
branch
from
August 21, 2026 03:19
a17672e to
ad27395
Compare
…ross restart Cleanup of LOAD replica information (task registry entry and staged files) now happens only at the terminal phase: - abortConsensus cleans up only after the ABORT marker was durably written; a failed marker write keeps the staged data for the coordinator's retry. - commitConsensus already cleaned after the COMMIT marker + load; followers clean when they apply the replicated marker. - The periodic idle-task eviction is removed (LoadCleanupScheduler deleted); there is no cleanup at any other time. - Restart no longer deletes leftover task dirs: recover() rebuilds each task from a durable task.meta (applied-piece prefix + staged file list) and re-registers it so the load can continue. Graceful shutdown also stops deleting staged files (closeForShutdown only releases file handles). - The staged file is forced before task.meta is persisted so the applied prefix never covers bytes that a machine crash could lose. - A terminal.marker written right before cleanup lets restart discard only the leftovers of loads that already reached COMMIT/ABORT. - Tasks whose durable meta is missing or corrupt are not resumed; they are left for the coordinator to fail loudly instead of forking the staged file.
commitConsensus now mirrors abortConsensus explicitly: the COMMIT marker is written first, and only after it is durably logged (or this node applies the replicated marker as a follower) may the staged files be loaded and cleaned up. A marker write failure keeps the staged data for the coordinator's retry and returns LOAD_FILE_ERROR instead of silently proceeding.
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
This PR has:
for an unfamiliar reader.
for code coverage.
Key changed/added classes (or packages if there are too many classes) in this PR