Skip to content

Batch detached node relationship deletes#569

Merged
adsharma merged 1 commit into
mainfrom
batch-detached-delete
Jun 5, 2026
Merged

Batch detached node relationship deletes#569
adsharma merged 1 commit into
mainfrom
batch-detached-delete

Conversation

@adsharma

@adsharma adsharma commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Fixes: #168

Summary

Reimplements the detached-delete batching from PR #169 on top of current main.

  • batches the relationship-detach phase for DETACH DELETE node execution
  • flushes pending batches when the DeleteNode operator exhausts its child and during finalize
  • groups multi-label batches by node table before touching relationship tables, preserving filtered match semantics
  • logs one generated RelDetachDeleteRecord per source-node batch and replays the ValueVector through detachDeleteBatch

Validation

  • ninja -C build/release
  • python3 scripts/run-clang-format.py --clang-format-executable /opt/homebrew/bin/clang-format-18 -r
  • shell smoke test: 1050-node DETACH DELETE crosses the 1024 batch boundary and removes all attached edges
  • shell smoke test: multi-label DETACH DELETE crosses the batch boundary and deletes only the intended table-specific relationship sets
  • shell smoke test: persisted reopen after batched DETACH DELETE returns expected node/edge counts, exercising WAL replay of batched detach-delete records

@adsharma adsharma marked this pull request as ready for review June 5, 2026 13:55
@adsharma adsharma force-pushed the batch-detached-delete branch from ee03db0 to 3d975fd Compare June 5, 2026 17:07
@adsharma adsharma merged commit 81ba718 into main Jun 5, 2026
4 checks passed
@adsharma adsharma deleted the batch-detached-delete branch June 5, 2026 19:37
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.

Optimization: Performing DETACH-DELETE on a large-scale graph will consume a very long time

1 participant