Repository navigation
Native glue: apply the P-04 and P-01b hunks that 99a9dc2 dropped - #71
Merged
Merged
Conversation
…tches via db.batch(), parallel insert_many into a vertex type creates vertices) Commit 99a9dc2 was meant to port humemai/arcadedb-embedded-python#538, and its tests came across, but its NativeExtras.java change is the XML-limits helper (loadWithoutXmlLimits) and nothing else: the two hunks of #538 never reached the native glue, so the native build still failed 5 tests (test_insert_many_parallel and test_insert_columns_parallel: "Cannot create a document of type 'Vtx' because is not a document type"; test_graph_batch_close_refused_in_the_callers_transaction_can_be_retried and test_a_second_graph_batch_is_refused_while_one_is_open: DID NOT RAISE; test_two_concurrent_batches_on_one_hub_lose_no_edge: "Slot rebase not possible" on close). P-04 (data loss): arcadedb_n_gb_create built its GraphBatch with GraphBatch.builder(db), which takes no part in LocalDatabase.batchStarted. It now opens the batch with db.batch(), as the JPype path does, so build() takes the guard and close() gives it back. The Python API is unchanged. P-01b: the async insert_parallel helper called newDocument for every row. It now looks the type up once per call (the rule of humemai #519 / DocumentBatcher): a vertex type gets newVertex, a document type newDocument, an edge type is refused with a message naming it. Needs a rebuilt native library. Checked on a fresh image built from this tree (native/scripts/build-image.sh, engine 26.10.2): test_bulk_insert.py and test_graph_batch.py 87 passed, 4 skipped (all NA-JVM), test_core.py 39 passed, test_concurrency.py 5 passed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tae898
added a commit
that referenced
this pull request
Oct 25, 2026
…) into native-ci-python-versions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tae898
added a commit
that referenced
this pull request
Oct 25, 2026
…umnar-port Co-Authored-By: Claude Opus 5.5 <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.
Fixes the 5 tests that still fail on the native build of #66 (CI parity run 40194002696) although 99a9dc2 was meant to fix them.
Root cause
99a9dc2 ("graph batches go through db.batch() (P-04), parallel insert_many into a vertex type creates vertices (P-01b)") ported the tests of humemai/arcadedb-embedded-python#538, but its change to
native/src/main/java/org/humemai/nativelib/NativeExtras.javais the XML-limits helper (loadWithoutXmlLimits,__disableXmlLimits) and nothing else. The two Java hunks of #538 never reached the native glue:arcadedb_n_gb_createstill calledGraphBatch.builder(db), which bypasses the engine's single-batch guard (LocalDatabase.batchStarted), and the asyncinsert_parallelhelper still callednewDocumentfor every row. The image was built from the right tree, so the stale glue is what the tests saw.Change
Only
NativeExtras.java, the same two hunks as #538:gbCreateopens the batch withdb.batch(), as the JPype path does, sobuild()takes the guard andclose()gives it back.insert_parallellooks the type up once per call (the rule of humemai #519 /DocumentBatcher): a vertex type getsnewVertex, a document typenewDocument, an edge type is refused with a message naming it; a missing type still raises the schema's own error.The XML-limits code from 99a9dc2 is untouched. The Python side and the tests need no change (the tests came across in 99a9dc2).
Checked
A fresh native image from this tree (
native/scripts/build-image.sh, engine 26.10.2, march compatibility), tests run from the checkout withARCADEDB_BACKEND=native:🤖 Generated with Claude Code