-
Notifications
You must be signed in to change notification settings - Fork 268
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
accounts-db: disable intrabatch account locks #4253
base: master
Are you sure you want to change the base?
Conversation
3e016b3
to
f748a5f
Compare
315ef3d
to
546adb0
Compare
546adb0
to
91fd4f2
Compare
2fb8527
to
11d1dcb
Compare
Err(err) => Err(err), | ||
}) | ||
.collect() | ||
if disable_intrabatch_account_locks { |
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.
Suggestion: This feature gate name is a little confusing as it's used here.
When disable_intrabatch_account_locks
is true, this means account locks within a batch shouldn't be allowed. But it's used the other way around here.
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.
the idea isnt that intrabatch locks shouldnt be allowed, but that the concept of intrabatch locking will cease to exist. i will think of a clearer name tho ty
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.
maybe relax_intrabatch_account_locks
// HANA TODO the vec allocation here is unfortunate but hard to avoid | ||
// we cannot do this in one closure because of borrow rules | ||
// play around with alternate strategies, according to benches this may be up to | ||
// 50% slower for small batches and few locks, but for large batches and many locks |
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.
bench using jemalloc? i'd think it would do a reasonable job of just keeping the mem in thread-local cache for re-use
aka "simd83 account locking"
TODO confirm it behaves right with the feature on, dedupe transactions via messagehash, write tests
Problem
Summary of Changes
Fixes #