-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[feat](cloud) Add a config for cloud txn lazy commit fuzzy test #50314
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
base: master
Are you sure you want to change the base?
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
if (bd(gen)) { | ||
return true; | ||
} | ||
return false; |
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.
if (bd(gen)) { | |
return true; | |
} | |
return false; | |
return bd(gen); |
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.
done
TeamCity cloud ut coverage result: |
cabaffb
to
50be895
Compare
run buildall |
TeamCity cloud ut coverage result: |
run buildall |
TeamCity cloud ut coverage result: |
run buildall |
TeamCity cloud ut coverage result: |
(request->has_is_2pc() && !request->is_2pc() && request->has_enable_txn_lazy_commit() && | ||
request->enable_txn_lazy_commit() && config::enable_cloud_txn_lazy_commit); | ||
|
||
if (!allow_txn_lazy_commit || | ||
(tmp_rowsets_meta.size() <= config::txn_lazy_commit_rowsets_thresold)) { | ||
if (force_txn_lazy_commit() && |
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.
while (!allow_txn_lazy_commit &&
(!enable_txn_lazy_commit_feature ||
(tmp_rowsets_meta.size() <= config::txn_lazy_commit_rowsets_thresold))) {
if (force_lazy_commit()) {
LOG();
break;
}
commit_txn_immediately(request, response, txn_kv_, txn_lazy_committer_, code, msg,
instance_id, db_id, tmp_rowsets_meta, err);
if ((MetaServiceCode::OK == code) || (TxnErrorCode::TXN_BYTES_TOO_LARGE != err) ||
!enable_txn_lazy_commit_feature) {
if (err == TxnErrorCode::TXN_BYTES_TOO_LARGE) {
msg += ", likely due to committing too many tablets. "
"Please reduce the number of partitions involved in the load.";
}
return;
}
DCHECK(code != MetaServiceCode::OK);
DCHECK(enable_txn_lazy_commit_feature);
DCHECK(err == TxnErrorCode::TXN_BYTES_TOO_LARGE);
LOG(INFO) << "txn_id=" << txn_id << " fallthrough commit_txn_eventually";
break;
}
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.
done
@@ -2514,6 +2514,20 @@ void commit_txn_with_sub_txn(const CommitTxnRequest* request, CommitTxnResponse* | |||
response->mutable_txn_info()->CopyFrom(txn_info); | |||
} // end commit_txn_with_sub_txn | |||
|
|||
static bool fuzzy_random() { | |||
std::mt19937 gen {std::random_device {}()}; |
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.
return (steady_clock():now().count() & 0x01)
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.
return (steady_clock():now().count() & 0x01)
done
a3f9a8e
to
80c1c60
Compare
run buildall |
TeamCity cloud ut coverage result: |
* when setting `enable_cloud_txn_lazy_commit_fuzzy_test=true`, `commit_txn` will be fifty percent using `commit_txn_eventually`
4964f2e
to
b04ee72
Compare
run buildall |
TeamCity cloud ut coverage result: |
run cloud_p0 |
enable_cloud_txn_lazy_commit_fuzzy_test=true
,commit_txn
will be fifty percent usingcommit_txn_eventually
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)