Skip to content

Spike indexed collection rebased - #1227

Open
noha wants to merge 2 commits into
mainfrom
spike-indexed-collection-rebased
Open

noha wants to merge 2 commits into
mainfrom
spike-indexed-collection-rebased

Conversation

@noha

@noha noha commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

noha added 2 commits September 7, 2026 00:26
A SoilIndexedCollection holds any number of SoilObjectIndexes. Each of them
derives its key from the added object by sending it one selector, so the same
object can be looked up by different properties.

Until the creating transaction commits, the backend index of a SoilObjectIndex
has no file yet. SoilMemoryIndexStore keeps its pages in memory for that phase;
the journal entry written during serialization creates the file on commit, and
materialization reconnects to the index in the segment.

Take the ideas from the spike in #961 but not its scaffolding: SoilIndex keeps
the file store as its default and gains #beMemoryStore to opt into memory pages
explicitly, instead of defaulting to memory and repairing that in #path:.
Index keys made from strings of different length do not sort alphabetically:
String>>asIndexKeyOfSize: packs the bytes into an integer, so a longer string
always sorts after a shorter one ('b' is 98, 'aa' is 24929). The order the
values of an index come back in therefore says nothing about which key they
were stored under, which is what the test wanted to show.
@noha
noha force-pushed the spike-indexed-collection-rebased branch from 1602092 to d046ec1 Compare September 6, 2026 22:26
@noha noha moved this to Todo in Soil project board Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant