Skip to content

Docs: what to do after a graph batch was interrupted before close() - #79

Merged
tae898 merged 2 commits into
mainfrom
graphbatch-interrupted-recovery
Oct 25, 2026
Merged

tae898 merged 2 commits into
mainfrom
graphbatch-interrupted-recovery

Conversation

@tae898

@tae898 tae898 commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

What

Adds an "If a graph batch is interrupted" section to docs/modules/ROOT/pages/how-to/bulk-loads.adoc (the page from #75). Python and embedded only; CHECK DATABASE is linked to the main ArcadeDB docs, not repeated.

What it says, and where the numbers come from

A graph_batch() load that is killed before close() returns (kill -9, default commit_every=1000, with and without use_wal=True, 40 kills in the probe) loses no committed chunk and leaves no edge that points at a missing vertex. But the engine links the edge records to their vertices (head pointers and incoming lists) in close(), so until then the committed edges exist (count(*) on the edge type counts them) and outE(), inE(), out() and MATCH reach none of them. CHECK DATABASE reports them as ORPHAN RECORD.

Measured on one kill (30,000 vertices, 70,000 edge records) on the native build 26.11.1.dev0, each step on the reopened database:

Step Edge records Reachable CHECK DATABASE
nothing 70,000 0 70,000 ORPHAN RECORD
CHECK DATABASE 70,000 0 same
CHECK DATABASE FIX 70,000 0 same (relinks nothing)
CHECK DATABASE FIX DELETE ORPHANS 0 0 nothing left
then new_edges over the existing vertices + close() 90,000 90,000 0 warnings

Re-running the same load with the same keys: create_vertices fails with DuplicatedKeyException on a unique key and changes nothing; re-running only the edges without the delete gives 160,000 edge records for 90,000 distinct edges (70,000 old orphans stay and keep being reported). The section therefore recommends FIX DELETE ORPHANS, then an edge-only reload.

One sentence says that splitting a long edge load over several closed batches leaves only the open batch unlinked after a kill. The probe did not measure that, and the page says so.

Check

Docs only. The new section has no hard-wrapped prose and the link target was fetched before it went in.

🤖 Generated with Claude Code

tae898 and others added 2 commits October 26, 2026 05:08
Adds "If a graph batch is interrupted" to the bulk-loads page: what a kill -9 leaves committed, why the committed edges are not traversable until close() links them, and the recovery that works on the native build (CHECK DATABASE FIX DELETE ORPHANS, then load the edges again over the existing vertices). CHECK DATABASE FIX relinks nothing, and re-running without the delete leaves duplicate edge records.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…h point as what close() does

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tae898
tae898 merged commit 1ae70a4 into main Oct 25, 2026
@tae898
tae898 deleted the graphbatch-interrupted-recovery branch October 25, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant