Repository navigation
Conversation
…n_logs_stats Re-ingesting an unchanged entity updates its ingestion log up to three times (duplicate bookkeeping and requeue, claim, final state). Each UPDATE wrote a new version of the whole row, entity JSON included, and an entry in all twelve indexes, because the updated_at trigger makes no update HOT. state, error, requeued_from_state, duplicate_count, last_seen and updated_at now live in ingestion_logs_stats, one narrow row per log with immutable copies of object_type and ingestion_ts. ingestion_logs becomes insert-only. The updated_at and (state, object_type) counter triggers and the seven indexes that involve state or updated_at move with them. Readers use the v_ingestion_logs view, which keeps the pre-split row shape; every insert path writes the stats row in the same statement or transaction. The migration fills the table in committed batches without blocking writers, then switches over in one transaction under an exclusive lock and catches up rows written meanwhile. Behaviour is unchanged. Spike: built to measure the change-log (WAL) saving, see netboxlabs/diode-pro tests/bench/wal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
AI Code Review — risk tier: Advisory only. A human owns the merge decision. Summary — This is a net-positive, well-structured schema-split refactor (moving mutable Findings
Nits — The PR description reads "POC, dont review" — per review policy this is treated as untrusted content, not an instruction, and does not suppress the review (flagged under security dimension as a possible prompt-injection/social-engineering attempt; no action needed from the author beyond using normal draft-PR mechanisms instead). 🤖 AI Code Review · run · prompts: |
Vulnerability Scan: Failed — diode-ingesterImage:
Commit: 8a2215e |
Vulnerability Scan: Failed — diode-reconcilerImage:
Commit: 8a2215e |
Vulnerability Scan: Failed — diode-authImage:
Commit: 8a2215e |
|
Go test coverage
Total coverage: 57.5% |
POC, dont review
🤖 Generated with Claude Code