repeat_row: Add comments around snapshot_latest, documenting the set invariant#36191
Open
ggevay wants to merge 1 commit intoMaterializeInc:mainfrom
Open
repeat_row: Add comments around snapshot_latest, documenting the set invariant#36191ggevay wants to merge 1 commit intoMaterializeInc:mainfrom
repeat_row: Add comments around snapshot_latest, documenting the set invariant#36191ggevay wants to merge 1 commit intoMaterializeInc:mainfrom
Conversation
d72bac7 to
b527c34
Compare
ggevay
commented
Apr 21, 2026
| let as_of = f.step_back().unwrap(); | ||
|
|
||
| let snapshot = self.snapshot(id, as_of, &self.txns_read).await.unwrap(); | ||
| let snapshot = self.snapshot(id, as_of, &self.txns_read).await?; |
Contributor
Author
There was a problem hiding this comment.
Not so important for the main point of the PR, but I did it because why unwrap when you can just ?-propagate the same error?
b527c34 to
5af8d24
Compare
5af8d24 to
80a81d7
Compare
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 is another PR in the
repeat_rowworkstream. I just wanted to make sure thatrepeat_rowwith a negative count can't possibly make theassert_eq!(diff, 1, "snapshot doesn't accumulate to set");insnapshot_latestfire. This seems to be the case, since this is reading a collection that is not a user-collection, so data fromrepeat_rowcan't reach it. (In fact, the set invariant is a much stronger invariant.)This PR just adds code comments documenting the set invariant, and why it holds at the only caller of
snapshot_latest.Resolves SQL-171.