Skip to content

Conversation

@mymeiyi
Copy link
Contributor

@mymeiyi mymeiyi commented Jan 23, 2025

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

  1. update_delete_bitmap may split to several transactions to avoid delete bitmap size is larger than the fdb transaction limit
  2. multi compaction jobs will change the initiators of the lock_info, which will cause txn_conflict of update_delete_bitmap.
  3. for update with multi transactions, the txn_confict error is more easily to happen, even after some retries, the update_delete_bitmap will fail
  4. the root cause is multi compactions should not conflict, pr 48024 solve it
  5. but branch-3.0 does not contain pr 48024, so modify the check lock_id to snapshot read to avoid txn_conflict. if lock_id is changed, the final commit_txn or commit_job can handle it

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

@Thearas
Copy link
Contributor

Thearas commented Jan 23, 2025

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 mymeiyi force-pushed the compact-update-dm branch 2 times, most recently from 249e84b to 59c93cb Compare January 23, 2025 11:31
std::string lock_val;
DeleteBitmapUpdateLockPB lock_info;
auto err = txn->get(lock_key, &lock_val);
auto err = txn->get(lock_key, &lock_val, lock_id == -1 /*snapshot*/);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add some unit/p0 tests to verify this branch.

At least, the following test case should be added
image

Copy link
Contributor

@cosven cosven Jan 24, 2025

Choose a reason for hiding this comment

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

Besides, the following test cases are also needed :)

  • compaction-load conflict
  • compaction-compaction conflict
  • ??? load-compaction conflict

@mymeiyi mymeiyi force-pushed the compact-update-dm branch from 59c93cb to a2526d1 Compare March 18, 2025 10:03
@mymeiyi
Copy link
Contributor Author

mymeiyi commented Mar 18, 2025

run buildall

@doris-robot
Copy link

TeamCity cloud ut coverage result:
Function Coverage: 83.09% (1081/1301)
Line Coverage: 66.09% (18012/27254)
Region Coverage: 65.46% (8871/13551)
Branch Coverage: 55.36% (4781/8636)
Coverage Report: http://coverage.selectdb-in.cc/coverage/a2526d1bce1aee7064482d72667f2fbbb74e34e4_a2526d1bce1aee7064482d72667f2fbbb74e34e4_cloud/report/index.html

@mymeiyi mymeiyi force-pushed the compact-update-dm branch from a2526d1 to 4ee0477 Compare May 30, 2025 10:02
@mymeiyi mymeiyi changed the base branch from master to branch-3.0 May 30, 2025 10:03
@mymeiyi mymeiyi force-pushed the compact-update-dm branch from 4ee0477 to bd9f7a6 Compare May 30, 2025 10:11
@mymeiyi
Copy link
Contributor Author

mymeiyi commented May 30, 2025

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 100.00% (8/8) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.13% (1094/1316)
Line Coverage 66.35% (18240/27492)
Region Coverage 66.03% (9017/13655)
Branch Coverage 55.93% (4883/8730)

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 Jun 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

PR approved by anyone and no changes requested.

@zhannngchen zhannngchen merged commit 840503e into apache:branch-3.0 Jun 5, 2025
24 of 25 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. dev/3.0.6-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants