-
Notifications
You must be signed in to change notification settings - Fork 83
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(fdb): conflict ranges #2063
fix(fdb): conflict ranges #2063
Conversation
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.
PR Summary
This PR fixes critical issues with FoundationDB transaction conflict range handling across multiple services and utilities in the Rivet platform.
- Added new
end_of_key_range
utility function infdb-util
that properly appends a 0 byte to end keys for single-key conflict ranges - Fixed lease expiration conflict detection in workflow engine by using proper end keys in
fdb_sqlite_nats/mod.rs
- Updated port allocation conflict ranges in
ds/allocate_ingress_ports.rs
to prevent concurrent allocation issues - Corrected client reservation conflict handling in Pegboard service to maintain data consistency during concurrent transactions
- Fixed allocation index update conflict ranges in Pegboard to ensure proper transaction isolation
8 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
pub fn end_of_key_range(key: &[u8]) -> Vec<u8> { | ||
let mut end_key = Vec::with_capacity(key.len() + 1); | ||
end_key.extend_from_slice(key); | ||
end_key.push(0); | ||
end_key | ||
} |
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.
style: Consider using Vec::from(key)
followed by push(0)
for better readability and potentially better performance since it avoids an extra copy
7b6ec47
to
403b5c7
Compare
b2020df
to
0e11e7a
Compare
c0ae31a
to
dc1d8cc
Compare
dc1d8cc
to
c3470c3
Compare
1ff560c
to
745d6de
Compare
c3470c3
to
dc1d8cc
Compare
dc1d8cc
to
c3470c3
Compare
c3470c3
to
dc1d8cc
Compare
dc1d8cc
to
c3470c3
Compare
Merge activity
|
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
Changes