[core] Parse postpone write id from the writer marker - #10266
Open
LuciferYang wants to merge 1 commit into
Open
LuciferYang wants to merge 1 commit into
LuciferYang wants to merge 1 commit into
Conversation
getWriteId split the file name on the first -s- separator, but the commit user is interpolated verbatim into the writer prefix and may itself contain -s-, so the wrong segment was parsed: a wrong write id skewed subtask affinity or the parse crashed the split assignment. Anchor the parse between the last -s- and the -w- writer marker. Assisted-by: GLM-5.3
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.
Purpose
PostponeBucketFileStoreWrite.getWriteIdrecovered the write id from a data file name by splitting on the first-s-. The name is built as{data-file.prefix}-u-{commitUser}-s-{writeId}-w-{uuid}-{count}, so whendata-file.prefixor the commit user contains-s-, the first-s-is not the writer's separator: the parse either throwsData file name ... does not match the patternor returns a wrong write id, which then misroutes splits undergetWriteId(...) % parallelism.This anchors the parse to the
-w-writer marker that always terminates the interpolated prefix. The write id is the digits between the last-s-before-w-and-w-, which is unaffected by any-s-or-w-inside the prefix or commit user (the uuid and count that follow-w-never containw).This closes #10265.
Tests
PostponeBucketWriterTest.testGetWriteIdWithSeparatorInCommitUserpins that a name whose commit user contains-s-parses to the correct write id. The old first--s-split returned a wrong value or threw on the same input.API and Format
No.
Documentation
No.