[branch-2.1] Picks "[Fix](merge-on-write) Fix duplicate key problem after adding sequence column for merge-on-write table #39958"#40010
Merged
dataroaring merged 2 commits intoapache:branch-2.1from 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 |
|
|
||
| Status Segment::lookup_row_key(const Slice& key, bool with_seq_col, bool with_rowid, | ||
| RowLocation* row_location) { | ||
| Status Segment::lookup_row_key(const Slice& key, const TabletSchema* latest_schema, |
Contributor
There was a problem hiding this comment.
warning: function 'lookup_row_key' exceeds recommended size/complexity thresholds [readability-function-size]
Status Segment::lookup_row_key(const Slice& key, const TabletSchema* latest_schema,
^Additional context
be/src/olap/rowset/segment_v2/segment.cpp:695: 87 lines including whitespace and comments (threshold 80)
Status Segment::lookup_row_key(const Slice& key, const TabletSchema* latest_schema,
^
zhannngchen
pushed a commit
that referenced
this pull request
Aug 28, 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
Contributor
Author
|
run buildall |
Contributor
Author
|
run beut |
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
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
picks #39958