feat(storage): support catalog transaction and add global transaction structure - #133
Merged
Merged
Conversation
…/txnManager trait
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces catalog transaction support and a unified global transaction structure that coordinates updates across both catalog and graph storage layers. The implementation follows a two-phase commit protocol where catalog changes are validated first, graph changes are committed, and then catalog changes are published using the same commit timestamp.
Key changes include:
- Introduction of
Transactionstruct that coordinates catalog and graph sub-transactions with shared timestamps and isolation levels - New versioned catalog implementation with MVCC support for schema operations
- Refactoring of timestamp and isolation level types from
minigu-transactiontominigu-commonfor shared access - Removal of trait-based abstractions (
Transaction,GraphTxnManager) in favor of concrete types
Reviewed changes
Copilot reviewed 42 out of 43 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| minigu/transaction/src/transaction.rs | Implements global Transaction with two-phase commit coordination between catalog and graph |
| minigu/transaction/src/manager.rs | Provides TransactionManager for creating unified transactions |
| minigu/catalog/src/txn/* | New catalog transaction infrastructure with versioned maps and MVCC |
| minigu/catalog/src/memory/* | Updates catalog implementations to support transactional operations |
| minigu/common/src/transaction.rs | Moves IsolationLevel enum to common for shared access |
| minigu/common/src/timestamp.rs | Moves timestamp types and error handling to common |
| minigu/storage/src/tp/transaction.rs | Removes Transaction trait, adds GraphTxnView for polymorphic access |
| minigu/storage/src/tp/memory_graph.rs | Updates graph operations to accept GraphTxnView instead of concrete types |
| minigu/context/src/graph.rs | Integrates TransactionManager into GraphContainer for unified transaction creation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ColinLeeo
self-requested a review
December 23, 2025 09:18
ColinLeeo
reviewed
Jan 5, 2026
ColinLeeo
reviewed
Jan 9, 2026
Contributor
|
LGTM |
# Conflicts: # minigu/context/src/graph.rs # minigu/gql/execution/src/executor/vector_index_scan.rs # minigu/gql/execution/src/source/property_scan_source.rs
# Conflicts: # Cargo.lock # Cargo.toml # minigu/catalog/src/lib.rs # minigu/catalog/src/memory/schema.rs # minigu/context/Cargo.toml # minigu/core/Cargo.toml # minigu/storage/Cargo.toml
# Conflicts: # minigu/context/src/graph.rs # minigu/core/src/procedures/export_graph.rs # minigu/core/src/procedures/import_graph.rs # minigu/storage/src/tp/manager.rs # minigu/storage/src/tp/memory_graph.rs # minigu/storage/src/tp/mod.rs # minigu/storage/src/tp/transaction.rs # minigu/transaction/src/lib.rs # minigu/transaction/src/transaction.rs
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.
feat(storage): support catalog transaction and add global transaction structure
Type
feat: (new feature)fix: (bug fix)docs: (doc update)refactor: (refactor code)test: (test code)chore: (other updates)Scope
query: (query engine)parser: (frontend parser)planner: (frontend planner)optimizer: (query optimizer)executor: (execution engine)op: (operators)storage: (storage engine)mvcc: (multi version concurrency control)schema: (graph model and topology)tool: (tools)cli: (cli)sdk: (sdk)none: (N/A)Description
Issue: #
Checklist
masterbranch.