Repository navigation
grust-ladybug: bulk loads COPY from a temporary CSV; lbug 0.20.4 - #7
Merged
Merged
Conversation
…20.4 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sak2FQcdgs5pkL2ruKrSUZ
…p the read-back The registered-Arrow COPY FROM (MATCH …) path is superlinear in the engine on relationship tables: 4,100 edges/s at 500 k, unfinished after two hours at 5 M (cit-Patents never loaded). The engine's file COPY takes the same rows, STRING keys and JSON props included, at 1.3 M edges/s and 2.2 M nodes/s, so nodes, edges and the metadata index are written through a temporary CSV (Arrow's writer, RFC 4180 quoting, ESCAPE='"'). A count query skips the read-back of existing ids and pairs when the target table is empty. Upsert semantics unchanged; the round-trip test covers commas, quotes, newlines, backslashes and nested JSON, then a second put over the same ids. lbug 0.20.4 (crates.io, 2026-09-10; no Rust-API change from 0.20.2). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sak2FQcdgs5pkL2ruKrSUZ
This was referenced Sep 18, 2026
grust-turso: durable group commit, parallel MVCC loads, FK-off loads, and a WAL/MVCC head-to-head
#6
Merged
alexy
added a commit
that referenced
this pull request
Sep 20, 2026
Documentation only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
alexy
added a commit
that referenced
this pull request
Sep 20, 2026
Documentation only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
alexy
added a commit
that referenced
this pull request
Sep 20, 2026
Verifies the corrected lineage against icecat's own README, records the fixture generator and independent parity reference on work/simple-rust-algo-bench, and raises that board #7's first constraint excludes the C++ NetworKit build that the icebug participant is. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #6 (
turso-mvcc-concurrency); only the last five commits are this PR.Why
LadybugDB never loaded cit-Patents in the strain harness: the load did not finish inside the 7,200 s budget at 9.7 GB RSS (2026-09-12-quegee), while the maintainer loads the same graph from CSR parquet in about five seconds. The engine was not the problem; the adapter's bulk path was.
bulk_load.rsregistered each chunk's rows as an Arrow table and ranCOPY t FROM (MATCH (a)-[r:scratch]->(b) RETURN …). Measured with the newcopy_benchexample (eigen, 1 M nodes / 5 M edges,lbug0.20.4):COPY FROM (MATCH …)(before)COPY t FROM <registered arrow table>COPY t FROM 'file.csv', this adapter's schema (STRING keys, JSON props)UINT64offsets) +COPY FROM (MATCH …)The relationship probe is superlinear in the engine; the engine's file
COPYtakes the same rows about 300× faster. ThelbugRust crate has no equivalent of the Python binding'sCOPY t FROM $df.The second cost was the per-chunk read-back of every existing node id and
(from, to)pair, kept to preserveput_graph's upsert semantics; the harness feeds large graphs in 5 M-edge chunks, so that read-back grew with every chunk and is where the 9.7 GB went.What changes
grust-ladybug: every bulk write (nodes, edges, the metadata index) is written to a temporary CSV with Arrow's writer (RFC 4180 quoting,ESCAPE='"') and loaded withCOPY t FROM 'file'. A count query skips the read-back when the target table is empty, so a fresh load costs nothing beyond the copy. Upsert semantics are unchanged: rows whose id or pair already exists still take the per-rowMERGEpath.lbug0.20.4 (crates.io, 2026-09-10; the Rust API is identical to 0.20.2).examples/copy_bench.rs: the measurement above,VARIANTS=ABCDE cargo run --release -p grust-ladybug --example copy_bench -- [nodes] [edges].Not in this PR
AG_CHUNK_EDGES) is the lever; a per-load session that remembers what this process copied would remove it.icebug-diskformat, native in 0.21.x) would be a different load path and, in the harness, a separately tagged profile.grust-ladybugon Linux because of the bundled-zstd duplicate symbols when linked next tozstd-sys; unchanged by 0.20.4.The strain harness pins this head (
6af2006) for the Ladybug ladder that follows the Turso, memory and LanceDB reruns.🤖 Generated with Claude Code
https://claude.ai/code/session_01Sak2FQcdgs5pkL2ruKrSUZ