Revision 91a5941a77ed585e25afa3bfa8f2ff769edf93fd

Committed on 13/12/2025 11:02 am by Zohaib Sibte Hassan <zohaib@sibte.pk> [GitHub Diff]

Optimize hot path logging and use cached schema for CDC operations

Hot path logging cleanup:
- Remove debug logs from applyDataChanges, rebuildStatementsFromCDC
- Remove per-entry loop logging in rebuildStatementsFromCDC (was O(n) logs)
- Remove "Transaction still active" debug log from GC scan
- Remove AcquireCDCRowLock conflict debug log (error return suffices)

Error handling improvements:
- Replace silent `_ = s.Heartbeat(txnID)` with Warn-level error logging
- Heartbeat failures now logged in WriteIntent and WriteIntentEntry

Schema caching optimization:
- Add GetCachedTableSchema() to ReplicatedDatabase for in-memory lookups
- Switch delta_sync applyCDCUpdate/Delete to use cached schema
- Switch replication_handler applyReplayCDCUpdate/Delete to cached schema
- Eliminates SQLite queries during CDC replay operations

DDL replication fix:
- Increment schema version on followers after DDL commit replication
- Ensures follower schema cache stays in sync with leader

???? Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>