Skip to content

Native glue: apply the P-04 and P-01b hunks that 99a9dc2 dropped - #71

Merged
tae898 merged 1 commit into
native-two-distfrom
p04-port-fix
Oct 25, 2026
Merged

tae898 merged 1 commit into
native-two-distfrom
p04-port-fix

Conversation

@tae898

@tae898 tae898 commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

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.java is the XML-limits helper (loadWithoutXmlLimits, __disableXmlLimits) and nothing else. The two Java hunks of #538 never reached the native glue: arcadedb_n_gb_create still called GraphBatch.builder(db), which bypasses the engine's single-batch guard (LocalDatabase.batchStarted), and the async insert_parallel helper still called newDocument for 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:

  • P-04: gbCreate opens the batch with db.batch(), as the JPype path does, so build() takes the guard and close() gives it back.
  • P-01b: insert_parallel 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; 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 with ARCADEDB_BACKEND=native:

  • tests/test_bulk_insert.py and tests/test_graph_batch.py: 87 passed, 4 skipped (all NA-JVM), including the 5 tests above
  • tests/test_core.py: 39 passed
  • tests/test_concurrency.py: 5 passed
  • bandit 1.9.4 (low/low), pre-commit (all files) and scripts/check_no_embedded_name.py: clean

🤖 Generated with Claude Code

…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
tae898 merged commit 60c3626 into native-two-dist Oct 25, 2026
2 of 3 checks passed
@tae898
tae898 deleted the p04-port-fix branch October 25, 2026 13:17
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>
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