Skip to content
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](cluster key) fix cluster key duplicated key #44776

Merged

Conversation

mymeiyi
Copy link
Contributor

@mymeiyi mymeiyi commented Nov 29, 2024

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:
the duplicated keys is happend when:

  1. do schema change and not finished
  2. write data and the publish phase skip calculate delete bitmap
  3. compact the newly rowsets without delete bitmap: the mow with cluster key need to do compaction with delete bitmap

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Nov 29, 2024

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 38.32% (9975/26029)
Line Coverage: 29.40% (83508/284052)
Region Coverage: 28.53% (42986/150686)
Branch Coverage: 25.15% (21833/86820)
Coverage Report: http://coverage.selectdb-in.cc/coverage/ce808d0f04f060539937db11b2e49e6e87bc5098_ce808d0f04f060539937db11b2e49e6e87bc5098/report/index.html

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Nov 29, 2024

run p0

dataroaring
dataroaring previously approved these changes Nov 29, 2024
Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 29, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

@mymeiyi mymeiyi force-pushed the fix-ck-schema-change-and-compaction branch from ce808d0 to 7323667 Compare December 2, 2024 04:19
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Dec 2, 2024
@mymeiyi
Copy link
Contributor Author

mymeiyi commented Dec 2, 2024

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 38.40% (9992/26020)
Line Coverage: 29.45% (83668/284144)
Region Coverage: 28.57% (43048/150682)
Branch Coverage: 25.20% (21887/86856)
Coverage Report: http://coverage.selectdb-in.cc/coverage/73236678c2f0dd96fa904ad714db77d3a8ca93c8_73236678c2f0dd96fa904ad714db77d3a8ca93c8/report/index.html

@mymeiyi mymeiyi force-pushed the fix-ck-schema-change-and-compaction branch from 7323667 to ef75aea Compare December 2, 2024 06:52
@mymeiyi
Copy link
Contributor Author

mymeiyi commented Dec 2, 2024

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 38.39% (9978/25990)
Line Coverage: 29.46% (83685/284082)
Region Coverage: 28.58% (43048/150627)
Branch Coverage: 25.21% (21889/86842)
Coverage Report: http://coverage.selectdb-in.cc/coverage/ef75aeae53ce7e2c48b1a4c13da22bd266ce1444_ef75aeae53ce7e2c48b1a4c13da22bd266ce1444/report/index.html

@mymeiyi mymeiyi force-pushed the fix-ck-schema-change-and-compaction branch from ef75aea to dc2ea14 Compare December 2, 2024 12:43
@mymeiyi
Copy link
Contributor Author

mymeiyi commented Dec 2, 2024

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 38.39% (9978/25990)
Line Coverage: 29.45% (83658/284086)
Region Coverage: 28.58% (43055/150627)
Branch Coverage: 25.20% (21887/86842)
Coverage Report: http://coverage.selectdb-in.cc/coverage/dc2ea14a043458b478203aa41bb4d7295f522602_dc2ea14a043458b478203aa41bb4d7295f522602/report/index.html

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Dec 3, 2024

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 38.39% (9977/25990)
Line Coverage: 29.45% (83664/284074)
Region Coverage: 28.58% (43045/150593)
Branch Coverage: 25.20% (21885/86840)
Coverage Report: http://coverage.selectdb-in.cc/coverage/e4628f13cd25116f7642ad98dee4bf384e051992_e4628f13cd25116f7642ad98dee4bf384e051992/report/index.html

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Dec 3, 2024

run external

OlapStopWatch watch;
std::vector<RowsetSharedPtr> rowsets;
for (const auto& rowset : _input_rowsets) {
std::lock_guard rwlock(tablet()->get_rowset_update_lock());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not necessary to hold the rowset_update_lock

OlapStopWatch watch;
std::vector<RowsetSharedPtr> rowsets;
for (const auto& rowset : _input_rowsets) {
Status st = _tablet->update_delete_bitmap_without_lock(_tablet, rowset, &rowsets);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to hold the header lock?

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Dec 3, 2024
Copy link
Contributor

github-actions bot commented Dec 3, 2024

PR approved by at least one committer and no changes requested.

@dataroaring dataroaring merged commit 6f59658 into apache:master Dec 4, 2024
23 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants