Skip to content

test: cover multi-base reads with shared-memory stores - #8824

Open
zhangyue19921010 wants to merge 4 commits into
lance-format:mainfrom
zhangyue19921010:fix/multi-base-memory-uri
Open

test: cover multi-base reads with shared-memory stores#8824
zhangyue19921010 wants to merge 4 commits into
lance-format:mainfrom
zhangyue19921010:fix/multi-base-memory-uri

Conversation

@zhangyue19921010

Copy link
Copy Markdown
Collaborator

Multi-base tests were built on memory://, whose bytes do not outlive a single ObjectStore instance: a write resolves its base stores through a registry of its own when no Session is supplied, while reads resolve them through the dataset's session. Data written into a base was therefore unreadable, so those tests could only assert manifest metadata and never exercised the multi-base read path.

Move them to shared-memory://, whose backends are process-global and keyed by authority, and assert in test_multi_base_create that the fragment written into a base reads back both through the writer's handle and through a freshly opened dataset. Both assertions fail on memory://.

Give each test its own authority so the process-global pool stays isolated; this also removes the bucket1/bucket2 names four add_bases tests shared. Document the constraint on MemoryStoreProvider so the next multi-base test does not repeat it.

Multi-base tests were built on `memory://`, whose bytes do not outlive a
single `ObjectStore` instance: a write resolves its base stores through a
registry of its own when no `Session` is supplied, while reads resolve them
through the dataset's session. Data written into a base was therefore
unreadable, so those tests could only assert manifest metadata and never
exercised the multi-base read path.

Move them to `shared-memory://`, whose backends are process-global and keyed
by authority, and scan the data back where it was only counted before.
`test_multi_base_create` reads its base fragment through both the writer's
handle and a freshly opened dataset; `test_multi_base_target_primary_and_bases`
scans the reopened dataset so its 21 rows actually come off primary, base1
(a dataset root) and base2 (not one) instead of `count_rows` answering from
the manifest.

Give each test its own authority so the process-global pool stays isolated;
this also removes the `bucket1`/`bucket2` names four `add_bases` tests shared.
Document the constraint on `MemoryStoreProvider` so the next multi-base test
does not repeat it.
@github-actions github-actions Bot added the chore label Aug 27, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Aug 27, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Aug 27, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Aug 27, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Aug 28, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate recommendation: approve.

The merged base leaves the author patch unchanged. Shared-memory provider, registry, and fresh-session semantics remain intact, and reopened scans continue to validate exact rows across primary and registered base paths.

Keeping memory stores instance-local preserves their isolation contract; limiting shared memory to these multi-actor fixtures remains the cleaner solution.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant