-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Enhancement] Introduce TxnStateCache for merge commit sync mode #55001
Conversation
@@ -360,7 +377,7 @@ class DynamicCache { | |||
return ret; | |||
} | |||
|
|||
mutable std::mutex _lock; |
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.
Why use bthread::Mutex?
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.
because the cache may be accessed in the brpc request
3a9b0ee
to
d761fda
Compare
return Status::ServiceUnavailable("Transaction state cache is stopped"); | ||
} | ||
TxnStateDynamicCacheEntry* entry = create_if_not_exist ? cache->get_or_create(txn_id, 1) : cache->get(txn_id); | ||
if (create_if_not_exist) { |
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.
going to set the txn id every time even the entry already exists because of create_if_not_exist = true
.
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.
yes. DynamicCache does not support to accept parameters for constructor when creating an entry, so use this way as a workaround
0e8b88f
to
55a3ea1
Compare
Quality Gate passedIssues Measures |
…55001 (#55071) This is the second PR of merge commit sync mode optimization #54995. Introduce TxnStateDispatcher on FE side. You can see #54995 for details Signed-off-by: PengFei Li <[email protected]>
…tarRocks#55001 (StarRocks#55071) This is the second PR of merge commit sync mode optimization StarRocks#54995. Introduce TxnStateDispatcher on FE side. You can see StarRocks#54995 for details Signed-off-by: PengFei Li <[email protected]>
55a3ea1
to
f47c46a
Compare
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
Signed-off-by: PengFei Li <[email protected]>
b959b0a
to
b098460
Compare
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 403 / 455 (88.57%) file detail
|
…rRocks#55001) Signed-off-by: PengFei Li <[email protected]>
…rRocks#55001) Signed-off-by: PengFei Li <[email protected]>
…kport #55001) (#55150) Signed-off-by: PengFei Li <[email protected]>
…kport #55001) (#55149) Signed-off-by: PengFei Li <[email protected]>
Why I'm doing:
This is the first PR of merge commit sync mode optimization #54995. Introduce
TxnStateCache
on BE side. You can see #54995 for detailsWhat I'm doing:
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: