Skip to content

feat(storage): support catalog transaction and add global transaction structure - #133

Merged
liuuys merged 35 commits into
TuGraph-family:masterfrom
liuuys:dev-catalog-txn-2
May 29, 2026
Merged

feat(storage): support catalog transaction and add global transaction structure#133
liuuys merged 35 commits into
TuGraph-family:masterfrom
liuuys:dev-catalog-txn-2

Conversation

@liuuys

@liuuys liuuys commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

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

  • I have prepared the pull request title according to the requirements.
  • I have successfully run all unit tests and integration tests.
  • I have already rebased the latest master branch.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.

Copilot AI 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.

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 Transaction struct 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-transaction to minigu-common for 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.

Comment thread minigu/catalog/src/memory/graph_type.rs
Comment thread minigu/catalog/src/memory/mod.rs
Comment thread minigu/context/src/graph.rs Outdated
@ColinLeeo
ColinLeeo self-requested a review December 23, 2025 09:18
Comment thread minigu/catalog/src/memory/directory.rs
Comment thread minigu/catalog/src/memory/graph_type.rs
Comment thread minigu/catalog/src/memory/graph_type.rs
Comment thread minigu/catalog/src/provider.rs Outdated
Comment thread minigu/catalog/src/txn/manager.rs
Comment thread minigu/catalog/src/txn/manager.rs
Comment thread minigu/context/src/graph.rs
Comment thread minigu/catalog/src/memory/directory.rs
@ColinLeeo

Copy link
Copy Markdown
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

@qishipengqsp qishipengqsp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

liuuys added 3 commits May 15, 2026 20:19
# 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
@liuuys
liuuys merged commit 9c000b2 into TuGraph-family:master May 29, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants