[Feature] Skip no-op edge CSR compaction after COPY

Open
#1,069 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@zhanglei1949 is already working on this.

Since Sep 14, 2026.

  • #1071 by @zhanglei1949 — closed without merging

Assessment

This issue has not been assessed yet.

Description

performance store transaction

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.
Dominant language
C++
Stars
176
Forks
36
Avg merge
1d 12h
Merged PRs (30d)
41

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from alibaba/neug

All issues in alibaba/neug

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.