Conversation
Append the configured mtree.schema to spock.node.info->'skip_schema' right after creating it on each node. The UPDATE is additive and idempotent, so operator-set entries are preserved and re-runs are noops. Best-effort: failures log a warning instead of aborting init. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis change adds a query helper and SQL template for registering a schema in Spock’s ChangesSkip-schema registration
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@db/queries/templates.go`:
- Around line 695-706: The RegisterSkipSchema template is updating
spock.node.info directly, but skip_schema must be supplied through
spock.sub_create or the related subscription API instead. Move this logic out of
the JSONB update in templates.go and wire the skip_schema list into the
subscription creation path, using the existing spock.sub_create integration
points so the value is consumed by Spock as intended.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6cf92325-1a9c-4a86-aa77-16d5370f7512
📒 Files selected for processing (3)
db/queries/queries.godb/queries/templates.gointernal/consistency/mtree/merkle.go
ACE owns a metadata schema (
mtree.schema, defaultpgedge_ace) on every cluster node. The objects in that schema — Merkle trees, CDC bookkeeping, per-node counters — are node-local by design. If Spock ever replicates them, peers corrupt each other.The recent Spock
node-level skip_schemafeature (spock@4396157d, spock@14c7f0ed) provides exactly the hook we need: a schema named inspock.node.info->'skip_schema'is excluded from structure sync, refused byrepset_add_table, and dropped in-stream by the walsender. This PR has ACE register its own schema with that mechanism the moment it creates it.What changes
db/queries/templates.go— newRegisterSkipSchemaSQL template.db/queries/queries.go—RegisterSkipSchema(ctx, db, schemaName)wrapper, returns rows affected.internal/consistency/mtree/merkle.go—initOneNodecalls it immediately afterqueries.CreateSchema.