-
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](commit) Fix does not skip commit if txn state is committed or visible #39786
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
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.
void XXXTransaction() {
readlock()
txn = getTransaction()
checkTransactionStateBeforeXXX()
readunlock()
do something no need lock()
writeLock()
checkTransactionStateBeforeXXX()
...
writeUnlock()
}
maybe in write lock scope, check transaction status again is better ?
here XXXTransaction XXX should include PreCommit/Commit/Abort
TPC-H: Total hot run time: 38382 ms
|
TPC-DS: Total hot run time: 186931 ms
|
ClickBench: Total hot run time: 30.71 s
|
run fe_ut |
run feut |
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. |
Please add a description of what scenario triggers the issue. |
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.
There should be a lock hold when check and commit. Otherwise, two parallel thread may check ok and commit together. It seems that lock on trasaction state is enough.
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. |
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
introduced in #32980
if a txn is committed twice, the check txn state is committed or visible and skip commit logic does not work