Repository navigation
Immutable edge tables do not emit CDC - #441
Merged
Merged
Conversation
Contributor
Author
|
Optimistic |
em3s
force-pushed
the
fix/immutable-edge-no-cdc
branch
from
July 21, 2026 14:30
385bab9 to
49f9579
Compare
An immutable edge table is an append-only log consumed by scan/poll, not a CDC stream — the log itself is the change history, so CDC would be redundant. Skip `writeCdc` for immutable edges in the mutation path; WAL is unaffected (written before the CDC step), so durability and async consumption are unchanged. This also removes an asymmetry surfaced while adding scan-and-delete: appends emitted CDC while evictions (which delete storage directly) did not. Now neither does, so an immutable table is consistently CDC-free. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
em3s
force-pushed
the
fix/immutable-edge-no-cdc
branch
from
July 21, 2026 14:37
49f9579 to
1aa286c
Compare
1 task done
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.
Summary
Immutable edge tables no longer emit CDC. An immutable edge is an append-only log consumed by scan/poll (it backs queue/v1), not a CDC stream — the log itself is the change history, so streaming a parallel CDC event per append is redundant.
This also removes an asymmetry surfaced while adding scan-and-delete (#438): appends emitted CDC while evictions — which delete storage directly — did not. Now neither does, so an immutable table is consistently CDC-free.
WAL is unaffected:
writeWalruns before the CDC step, so durability and async consumption are unchanged. Only the downstream CDC stream is skipped, and only for immutable edges.Changes
MutationService.mutate— skipengine.writeCdc(...)when the table's schema isModelSchema.ImmutableEdge. Mutable edge / multi-edge / vertex paths are untouched.How to Test
./gradlew :engine:test --tests "*ImmutableEdgeSpec"— includes a case: append succeeds (CREATED) yet emits no CDC for the table../gradlew :engine:test --tests "*GraphSystemAsyncSpec" --tests "*CdcSpec"— non-immutable mutations still emit CDC (regression guard)../gradlew :engine:spotlessCheck.AI Assistance