Skip to content

feat: make Dataset::object_store sync by pre-initializing base stores#6670

Open
jackye1995 wants to merge 3 commits intolance-format:mainfrom
jackye1995:jack/sync-object-store
Open

feat: make Dataset::object_store sync by pre-initializing base stores#6670
jackye1995 wants to merge 3 commits intolance-format:mainfrom
jackye1995:jack/sync-object-store

Conversation

@jackye1995
Copy link
Copy Markdown
Contributor

Summary

  • Pre-initialize all base object stores during Dataset construction and cache them in HashMap<u32, Arc<ObjectStore>>
  • Dataset::object_store(base_id) is now a sync HashMap lookup instead of an async ObjectStore::from_uri_and_params call
  • object_store_for_data_file, object_store_for_deletion, object_store_for_index are also sync
  • with_object_store_wrappers re-wraps cached base stores alongside the primary store
  • ~40 call sites updated to remove .await

Pre-initialize all base object stores during Dataset construction and
cache them in a HashMap<u32, Arc<ObjectStore>>. This makes object_store()
a sync HashMap lookup instead of an async ObjectStore::from_uri_and_params
call on every access.

Changes:
- Add base_object_stores field to Dataset
- init_base_object_stores called during open/checkout
- object_store(), object_store_for_data_file, object_store_for_deletion,
  object_store_for_index are now sync
- with_object_store_wrappers re-wraps cached base stores
- All ~40 call sites updated to remove .await
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added the enhancement New feature or request label May 3, 2026
@github-actions github-actions Bot added the python label May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant