prevent proxy locking while snapshotting#8131
Merged
Conversation
timvisee
approved these changes
Feb 16, 2026
Member
timvisee
left a comment
There was a problem hiding this comment.
That's a subtle change! Looks good. I see we now only hold a lock on the segment to clone the wrapped segment for a very short period of time.
I did not re-test the deadlock locally, and am assuming you've done that already.
Member
Author
yes, it is enough to just send update requests to block everything |
timvisee
pushed a commit
that referenced
this pull request
Feb 16, 2026
* [manual] do not lock proxy segmen while accessing wrapped segment * fmt * [manual] remove extra update lock
3 tasks
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
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.
This PR rolls back changes of #7196
Why it is problematic?
Why it should be ok not to hold the lock?
Proxy segments are design explicitly for this situation - allow read + write operations, while underlying segment is accessed for read for a long time. This is how optimization functions.
Requiring it to be locked for the same duration as wrapped segment essentially kills the idea of proxy segment.
Extra changes of a new updates lock for the duration of proxifying didn't show any improvement, but I think it might be good to have anyway - it prevents update operation from reading/writing directly into wrapped segments after they are already proxified.☝️ this doesn't work because of deadlock on parallel snapshots