[Feature] Skip no-op edge CSR compaction after COPY
- Dominant language
- C++
- Stars
- 157
- Forks
- 32
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 94
Description
## Problem
The checkpoint finalization path compacts every edge table touched by COPY. For a plain edge table loaded through the timestamp-zero batch path, this CSR scan is redundant when the table contains no inherited ordinary writes or tombstones.
## Proposed behavior
Track whether an edge table actually needs CSR normalization, persist that state across incremental checkpoints, and skip compaction only when both conditions hold:
- the edge table has no neighbor sort key;
- the table has no pending timestamps or tombstones from ordinary mutations.
Sort-key edge tables continue to compact and sort. Legacy nonzero checkpoints without the new state use a conservative fallback and still compact.
## Acceptance criteria
- Plain timestamp-zero COPY targets skip both CSR compact calls.
- Ordinary add, update, and delete paths force later compaction.
- The state survives clone, checkpoint persistence, module reuse, and reopen.
- Legacy manifests cannot cause a required compaction to be skipped.
- Direct CSV COPY data remains correct before and after checkpoint reopen, without using a bulk-load `Session`.
Contributor guide
Assessment
This issue has not been assessed yet.