Skip to content

[core] Parse postpone write id from the writer marker - #10266

Open
LuciferYang wants to merge 1 commit into
apache:masterfrom
LuciferYang:m/core-088-writeid-parse
Open

LuciferYang wants to merge 1 commit into
apache:masterfrom
LuciferYang:m/core-088-writeid-parse

Conversation

@LuciferYang

Copy link
Copy Markdown
Contributor

Purpose

PostponeBucketFileStoreWrite.getWriteId recovered 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 when data-file.prefix or the commit user contains -s-, the first -s- is not the writer's separator: the parse either throws Data file name ... does not match the pattern or returns a wrong write id, which then misroutes splits under getWriteId(...) % 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 contain w).

This closes #10265.

Tests

  • PostponeBucketWriterTest.testGetWriteIdWithSeparatorInCommitUser pins 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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Postpone-bucket getWriteId misparses the write id when data-file.prefix or the commit user contains the -s- separator

1 participant