-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](cloud-mow) get delete bitmap update lock should create a new Transaction when encounter TXN_TOO_OLD #44691
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
zhannngchen
left a comment
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. |
|
|
||
| void internal_get_tablet_stats(MetaServiceCode& code, std::string& msg, Transaction* txn, | ||
| void internal_get_tablet_stats(MetaServiceCode& code, std::string& msg, | ||
| std::unique_ptr<Transaction>& txn, std::shared_ptr<TxnKv>& txn_kv, |
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.
This is a behavior change, semantic changed, txn atomic is not garanteed if we create a new txn.
Fix where this internal_get_tablet_stats() is called if we met TXN_TOO_OLD
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.
@gavinchou already change the code, take a look please
…ansaction when encounter TXN_TOO_OLD
13b8035 to
5f80108
Compare
|
run buildall |
|
run buildall |
| code = MetaServiceCode::OK; | ||
| txn = nullptr; | ||
| retry++; | ||
| err = txn_kv_->create_txn(&txn); |
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.
overwrite the txn cannot modify the "delete_bitmap_upldate_lock"
What problem does this PR solve?
Related PR: #37670
Problem Summary:
When the number of tablet is big, get delete bitmap update lock may cost over 5 seconds, which will lead to transaction timeout, we should create a new transaction to get the remaining tablet stats.
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)