-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix](merge-on-write) segcompaction should process delete bitmap if necessary #38369
[fix](merge-on-write) segcompaction should process delete bitmap if necessary #38369
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
run buildall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
run buildall |
6865700
to
7759455
Compare
run buildall |
run buildall |
TPC-H: Total hot run time: 39487 ms
|
TPC-DS: Total hot run time: 171977 ms
|
ClickBench: Total hot run time: 30.94 s
|
run buildall |
TPC-H: Total hot run time: 39742 ms
|
TPC-DS: Total hot run time: 174282 ms
|
ClickBench: Total hot run time: 30.2 s
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
## Proposed changes Issue Number: close #xxx introduced by #38369
…ecessary (apache#38369) ## Proposed changes Issue Number: close #xxx When loading data to a unique key table with sequence column, some data in current load job might be marked as delete due to a lower sequence value. If there's many segments in such load job, segcompaction might be triggered, which don't process the delete bitmap currently, will cause data correctness issue For example: 1. we have 4 segments in current load job initially, and due to seq column, some rows are marked as deleted 2. after segcompaction, if we don't process the delete bitmap, it's content is still corresponding to the old segment layout, and row 7,14,15 is not mark deleted correctly on new generated segment 1. 3. in this PR, we convert old delete bitmap to fit new segment layout, it use similar way as base/cumulative compaction to convert delete bitmaps on old layout to new one, but the rowid conversion is simpler ![whiteboard_exported_image-2](https://github.com/user-attachments/assets/a419b6a4-e583-457a-bf4e-56d9bd2a3544)
…ecessary (#38369) ## Proposed changes Issue Number: close #xxx When loading data to a unique key table with sequence column, some data in current load job might be marked as delete due to a lower sequence value. If there's many segments in such load job, segcompaction might be triggered, which don't process the delete bitmap currently, will cause data correctness issue For example: 1. we have 4 segments in current load job initially, and due to seq column, some rows are marked as deleted 2. after segcompaction, if we don't process the delete bitmap, it's content is still corresponding to the old segment layout, and row 7,14,15 is not mark deleted correctly on new generated segment 1. 3. in this PR, we convert old delete bitmap to fit new segment layout, it use similar way as base/cumulative compaction to convert delete bitmaps on old layout to new one, but the rowid conversion is simpler ![whiteboard_exported_image-2](https://github.com/user-attachments/assets/a419b6a4-e583-457a-bf4e-56d9bd2a3544)
## Proposed changes Issue Number: close #xxx introduced by #38369
…ecessary (#38369) ## Proposed changes Issue Number: close #xxx When loading data to a unique key table with sequence column, some data in current load job might be marked as delete due to a lower sequence value. If there's many segments in such load job, segcompaction might be triggered, which don't process the delete bitmap currently, will cause data correctness issue For example: 1. we have 4 segments in current load job initially, and due to seq column, some rows are marked as deleted 2. after segcompaction, if we don't process the delete bitmap, it's content is still corresponding to the old segment layout, and row 7,14,15 is not mark deleted correctly on new generated segment 1. 3. in this PR, we convert old delete bitmap to fit new segment layout, it use similar way as base/cumulative compaction to convert delete bitmaps on old layout to new one, but the rowid conversion is simpler ![whiteboard_exported_image-2](https://github.com/user-attachments/assets/a419b6a4-e583-457a-bf4e-56d9bd2a3544)
## Proposed changes Issue Number: close #xxx introduced by #38369
…ecessary (apache#38369) Issue Number: close #xxx When loading data to a unique key table with sequence column, some data in current load job might be marked as delete due to a lower sequence value. If there's many segments in such load job, segcompaction might be triggered, which don't process the delete bitmap currently, will cause data correctness issue For example: 1. we have 4 segments in current load job initially, and due to seq column, some rows are marked as deleted 2. after segcompaction, if we don't process the delete bitmap, it's content is still corresponding to the old segment layout, and row 7,14,15 is not mark deleted correctly on new generated segment 1. 3. in this PR, we convert old delete bitmap to fit new segment layout, it use similar way as base/cumulative compaction to convert delete bitmaps on old layout to new one, but the rowid conversion is simpler ![whiteboard_exported_image-2](https://github.com/user-attachments/assets/a419b6a4-e583-457a-bf4e-56d9bd2a3544)
## Proposed changes Issue Number: close #xxx introduced by apache#38369
…ecessary (apache#38369) (apache#39707) Issue Number: close #xxx cherry-pick apache#38369 and apache#38800
…ecessary (apache#38369) (apache#39749) cherry-pick apache#38369 and apache#38800
Proposed changes
Issue Number: close #xxx
When loading data to a unique key table with sequence column, some data in current load job might be marked as delete due to a lower sequence value.
If there's many segments in such load job, segcompaction might be triggered, which don't process the delete bitmap currently, will cause data correctness issue
For example: