Open
Conversation
- the forward of size to the iterator in SoilIndex is overridden in both subclasses to read from headerpage, do that here - The size in SoilIndexIterator should not be the slow one, as this is very confusing when we fall bacl to the slow case. It is overridden in all subclasses. Use index size here - add esxplizit #sizeViaIteration - Move size that accesses readVersion to SoilRestoringIndexIterator This still has the problem that the #size is different if called via the index vs. the iterator. A next refactoring could change it to *always* forward to the iterator from the index, as we do with many other methods
noha
reviewed
Mar 28, 2026
| the header page is newer than the current transaction we need to scan | ||
| the index for the size" | ||
| headerPage := index headerPage. | ||
| ^ (readVersion isNil or: [ headerPage lastTransaction > readVersion ]) |
Contributor
There was a problem hiding this comment.
I'm not sure we should fall back to the scanning one. Especially here no readVersion always scans. And in transactions we want the size for that readVersion and scanning always gives the actual size. Well at least if we are not restoring all pages which would be super slow
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 still has the problem that the #size is different if called via the index vs. the iterator. A next refactoring could change it to always forward to the iterator from the index, as we do with many other methods