[Fix](merge-on-write) Fix duplicate key problem after adding sequence column for merge-on-write table#39958
Merged
zhannngchen merged 1 commit intoapache:masterfrom Aug 28, 2024
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
Contributor
Author
|
run buildall |
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
TPC-H: Total hot run time: 38196 ms |
TPC-DS: Total hot run time: 187418 ms |
ClickBench: Total hot run time: 30.92 s |
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
This was referenced Aug 28, 2024
Yukang-Lian
approved these changes
Aug 28, 2024
dataroaring
pushed a commit
that referenced
this pull request
Sep 3, 2024
… column for merge-on-write table (#39958) ## Proposed changes Currently, `BaseTablet::lookup_row_key()` use tablet_meta's schema to decide whether a tablet has sequence column. But users can use `ALTER TABLE tbl ENABLE FEATURE "SEQUENCE_LOAD" WITH ...` to add hidden sequence column on MOW table. This is a light schema change which will not change the BE's tablet meta, thus causing wrong behavior in `BaseTablet::lookup_row_key()`. This PR use the schema of the current load, which is the latest schema, to decide whether a tablet has sequence column and correct the lookup procedure in `BaseTablet::lookup_row_key()` and `Segment::lookup_row_key()`. branch-2.1-pick: #40010 branch-2.0-pick: #40015
Closed
bobhan1
added a commit
to bobhan1/doris
that referenced
this pull request
Jan 21, 2025
… column for merge-on-write table apache#39958 (apache#40015)
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.
Proposed changes
Currently,
BaseTablet::lookup_row_key()use tablet_meta's schema to decide whether a tablet has sequence column. But users can useALTER TABLE tbl ENABLE FEATURE "SEQUENCE_LOAD" WITH ...to add hidden sequence column on MOW table. This is a light schema change which will not change the BE's tablet meta, thus causing wrong behavior inBaseTablet::lookup_row_key().This PR use the schema of the current load, which is the latest schema, to decide whether a tablet has sequence column and correct the lookup procedure in
BaseTablet::lookup_row_key()andSegment::lookup_row_key().branch-2.1-pick: #40010
branch-2.0-pick: #40015