Conversation
generall
commented
Jan 24, 2026
Comment on lines
-536
to
-541
| self.tracker | ||
| .read() | ||
| .iter_pointers() | ||
| .filter_map(|(point_offset, opt_pointer)| { | ||
| opt_pointer.map(|pointer| (point_offset, pointer)) | ||
| }) |
Member
Author
There was a problem hiding this comment.
this locked tracker for the whole existance of the iterator
generall
commented
Jan 24, 2026
| } | ||
|
|
||
| let old_pointers = tracker.write().write_pending_and_flush(pending_updates)?; | ||
| let old_pointers = tracker.write().write_pending(pending_updates); |
Member
Author
There was a problem hiding this comment.
this was waiting for iterator and blocking everything
timvisee
approved these changes
Jan 26, 2026
| length, | ||
| } = pointer; | ||
|
|
||
| let raw = self.read_from_pages::<true>(page_id, block_offset, length); |
Member
There was a problem hiding this comment.
This looks sound 👍
I was afraid it could data race where newly incoming data could be written to pages before we read here. But writes require a &mut self, while this holds a &self.
IvanPleshkov
pushed a commit
that referenced
this pull request
Jan 27, 2026
* granular lock for writing and flushing pending updates in gridstore tracker * avoid grigstore tracker lock in iterator
generall
added a commit
that referenced
this pull request
Feb 9, 2026
* granular lock for writing and flushing pending updates in gridstore tracker * avoid grigstore tracker lock in iterator
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.
Currently, there is a livelock problem, which reproduces in the following situation:
During index building search gets stuck.
Why it happens?
trackerinside gridstore. It is unternally mutable.trackeras we have an iterator going on, but it also stays in a queue and prevents incomming requests from reading gridstore.This PR changes behaviour of the iterator, so it doesn't require locking the tracker whole time.
It also includes couple of cosmetic changes