-
Notifications
You must be signed in to change notification settings - Fork 859
Deprecate rocksdb.transaction-lock-timeout
option
#21904
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rocksdb.transaction-lock-timeout
optionrocksdb.transaction-lock-timeout
option
goedderz
reviewed
Aug 11, 2025
Co-authored-by: Tobias Gödderz <tobias@arangodb.com>
goedderz
reviewed
Aug 11, 2025
Co-authored-by: Tobias Gödderz <tobias@arangodb.com>
Co-authored-by: Tobias Gödderz <tobias@arangodb.com>
goedderz
approved these changes
Aug 11, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Scope & Purpose
--rocksdb.transaction-lock-timeout
do very little since we practically ignore the value and set our own in this part of the code in RocksDBTrxBaseMethods.cpp:meaning that whatever was the
--rocksdb.transaction-lock-timeout
value we will override it.We use RocksDB transactions with
set_snapshot
set to true and pessimistic concurrency control). This means thatRocksDB locks all objects first and does not wait for Commit to perform checks; it can do them immediately.
And when another transaction wants to change the object that we are locking, then the question is whether the object that we are locking will be changed or not. E.g., using
GetForUpdate
does lock the object but might not change it; therefore, the lock timeout here serves us to determine for how long we will wait for the lock, but does not guarantee that even when the lock is released, there will not be conflicts.The timeout plays a role when we have
delaySnapshot
and we have that only for single operations; the delay snapshot in our case, does not setset_snapshot
of transaction, which means it does not take the snapshot and does not perform the check,s which makes it much quicker to execute and in this case the timeout does make sense, since we will not abort on conflict but will just wait until whichever transaction holds it to release it.Also, changing the lock-timeout to 0 might not be a good option since the lock being acquired is a lock on RocksDB PointLockManager, which enables establishing a lock on the actual key. Meaning the timeout is on a lock at a level above the document lock whose timeout we would want to set. That can cause spurious failures even without any conflicting transactions.
Checklist
Related Information
(Please reference tickets / specification / other PRs etc)