-
Notifications
You must be signed in to change notification settings - Fork 13
Remove direct V2 engine calls from V3 mutation path #200
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Background
Related: #173 (Replace StorageBackend in V2 engine)
The Problem: Replacing StorageBackend in entire V2 engine is too complex.
Better Approach: Instead of refactoring V2 engine globally, decouple V3 (mutation/query) from V2, then deprecate V2 entirely.
Why? Once V3 mutation and query no longer directly call V2 components, we can discard V2 engine wholesale without maintaining backward compatibility.
Path: /graph/v3/databases/{database}/tables/{table}/edges
- EdgeMutationController → V3MutationService → V3CompatibleTableBinding
Currently makes direct v2 calls:
graph.wal.write(),graph.cdc.write()(V3MutationService)label.findHashEdge(),label.acquireLock/releaseLock,label.handleDeferredRequests()(V3CompatibleTableBinding)
Goal: Decouple via MutationEngine abstraction → all v2 calls become indirect → V2 engine becomes replaceable/discardable.
Task
- Define
MutationEngineinterface (abstracts v2 operations) - Implement
V2BackedMutationEngine(v2 backend wrapper) - Refactor V3MutationService (remove direct Graph/label calls)
- Spring configuration (register MutationEngine bean)
- Testing (verify API behavior unchanged)
Done When
- V3MutationService has no direct Graph reference
- All v2 calls go through MutationEngine
-
/graph/v3/...path fully decoupled from V2 engine internals
Notes
- V3 implementation separate (future)
- Same pattern applies to V3Query path
- After both V3Mutation and V3Query decouple, V2 engine can be discarded
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request