-
-
Notifications
You must be signed in to change notification settings - Fork 153
Updates for Keystone #1449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates for Keystone #1449
Conversation
- Added methods for Overview, Keystone, and Conversation in Metastore - Introduced a JSON error struct
WalkthroughThis PR extends the Metastore trait with nine new asynchronous CRUD methods grouped into three metadata management categories: overviews, keystones, and conversations. Corresponding implementations are added to ObjectStoreMetastore. Additionally, a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes The additions follow consistent CRUD patterns across multiple trait methods, reducing cognitive load. However, each implementation file requires verification of correct object store path construction, serialization logic, and error handling consistency across the nine new methods. Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
src/metastore/metastore_traits.rs(2 hunks)src/metastore/metastores/object_store_metastore.rs(2 hunks)src/prism/logstream/mod.rs(1 hunks)src/utils/error.rs(1 hunks)src/utils/mod.rs(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-06T04:26:17.191Z
Learnt from: parmesant
PR: parseablehq/parseable#1424
File: src/enterprise/utils.rs:65-72
Timestamp: 2025-09-06T04:26:17.191Z
Learning: In Parseable's metastore implementation, MetastoreError::to_detail() returns a MetastoreErrorDetail struct (not a string), which contains structured error information including operation, message, stream_name, and other contextual fields. This struct is designed to be boxed in ObjectStorageError::MetastoreError(Box<MetastoreErrorDetail>).
Applied to files:
src/utils/error.rs
🧬 Code graph analysis (3)
src/utils/error.rs (1)
src/prism/logstream/mod.rs (1)
status_code(391-404)
src/metastore/metastores/object_store_metastore.rs (2)
src/metastore/metastore_traits.rs (9)
get_overviews(48-48)put_overview(49-53)delete_overview(54-54)get_keystones(57-57)put_keystone(58-58)delete_keystone(59-59)get_conversations(62-62)put_conversation(63-63)delete_conversation(64-64)src/storage/object_storage.rs (1)
to_bytes(1082-1086)
src/metastore/metastore_traits.rs (1)
src/metastore/metastores/object_store_metastore.rs (9)
get_overviews(84-98)put_overview(101-108)delete_overview(111-117)get_keystones(120-133)put_keystone(136-140)delete_keystone(143-147)get_conversations(150-163)put_conversation(166-170)delete_conversation(173-177)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Build Default aarch64-apple-darwin
- GitHub Check: Build Default x86_64-pc-windows-msvc
- GitHub Check: Build Default x86_64-apple-darwin
- GitHub Check: Build Default aarch64-unknown-linux-gnu
- GitHub Check: Build Kafka x86_64-unknown-linux-gnu
- GitHub Check: Build Kafka aarch64-apple-darwin
- GitHub Check: Build Default x86_64-unknown-linux-gnu
- GitHub Check: Quest Smoke and Load Tests for Distributed deployments
- GitHub Check: coverage
- GitHub Check: Quest Smoke and Load Tests for Standalone deployments
🔇 Additional comments (14)
src/utils/mod.rs (1)
21-21: LGTM!The module declaration correctly exposes the new error module as part of the public API.
src/metastore/metastore_traits.rs (4)
19-19: LGTM!The HashMap import is necessary for the
get_overviewsreturn type.
47-54: LGTM with design note.The overview methods use a different signature pattern compared to keystone/conversation methods:
get_overviewsreturns a HashMap keyed by stream name (vs Vec for others)put_overviewrequires both the object and stream namedelete_overviewtakes only the stream name (vs object for others)This design aligns with the implementation where overviews are stored per-stream at
{stream}/overview, while keystones/conversations use object IDs.
56-59: LGTM!The keystone methods follow the established pattern used by other metadata methods (alerts, targets, etc.), using
MetastoreObjectfor put/delete operations.
61-64: LGTM!The conversation methods follow the same established pattern as keystones and other metadata types.
src/metastore/metastores/object_store_metastore.rs (9)
20-20: LGTM!The HashMap import is required for the
get_overviewsimplementation.
100-108: LGTM!The implementation correctly serializes and stores the overview at the expected path.
110-117: LGTM!The delete implementation is correct and follows the established pattern.
119-133: LGTM!The implementation correctly filters keystone files from the
.keystonedirectory, excluding conversation files (those prefixed withconv_).
135-140: LGTM!The implementation correctly derives the path from the object ID and stores the keystone.
142-147: LGTM!The delete implementation correctly derives the path from the object ID.
149-163: LGTM!The implementation correctly filters conversation files from the
.keystonedirectory using theconv_prefix to differentiate them from keystone files.
165-170: LGTM!The implementation correctly uses the
conv_prefix to store conversations in the.keystonedirectory.
172-177: LGTM!The delete implementation correctly derives the path with the
conv_prefix, matching the put operation.
Description
DetailedErrorThis PR has:
Summary by CodeRabbit