From 0e8ed4a3f1a3cbb29858ab93942c72e4a63a1579 Mon Sep 17 00:00:00 2001 From: Taewoon Kim Date: Mon, 30 Nov 2026 11:10:22 +0900 Subject: [PATCH] docs: what 26.12.1 does with a bad graph_batch endpoint and an unlisted error subclass; to_json() text per build #543 and #544 are held for the 26.12.1 decision, so the pages state the behaviour without them, each with a REMOVE WHEN comment. The which-package table gains the to_json() row of #545/#546 and points to to_json_list(). --- docs/modules/ROOT/pages/how-to/bulk-loads.adoc | 5 +++++ docs/modules/ROOT/pages/how-to/errors.adoc | 3 ++- docs/modules/ROOT/pages/which-package.adoc | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/modules/ROOT/pages/how-to/bulk-loads.adoc b/docs/modules/ROOT/pages/how-to/bulk-loads.adoc index 99549224..8faec4a5 100644 --- a/docs/modules/ROOT/pages/how-to/bulk-loads.adoc +++ b/docs/modules/ROOT/pages/how-to/bulk-loads.adoc @@ -313,6 +313,11 @@ with db.graph_batch(batch_size=100, chunk_cache_capacity=1_000) as batch: Both arguments are bounds, not allocations you must reach: a batch that holds more edges than `batch_size` flushes early, and a cache that fills evicts entries and reloads them from the database on a miss. Leave them at their defaults for a bulk load of many edges in one batch. The numbers are one machine and single runs, so read them as an order of magnitude. +== Edge endpoints in a graph batch + +// REMOVE WHEN: the endpoint check of ArcadeData/arcadedb-python#543 merges; its section replaces this one. +`GraphBatch.new_edge` and `GraphBatch.new_edges` do not check, on either package, that an endpoint is a vertex that exists (https://github.com/ArcadeData/arcadedb-python/issues/506[#506]). A RID of no record, or a RID of a document or an edge, is buffered like any other endpoint, and the error comes only at the flush or at `close()`: `RecordNotFoundError` for a RID of no record, and an `ArcadeDBError` for a document or an edge. By then the batch can already have written edge records that `out()` and `in()` do not reach, in the worst case every edge of the load. Pass vertices or RIDs that the load itself created or read, and check RIDs that come from elsewhere before you buffer edges to them. + == If a graph batch is interrupted This section is about a `graph_batch()` load that stops before `close()` returns, for example when the process is killed (`kill -9`, the out-of-memory killer, power loss). An exception inside a `with db.graph_batch() as batch:` block still runs `close()`. The numbers below come from a kill probe on the `arcadedb` (native) package: `kill -9` in the middle of the edge phase, the default `commit_every=1000`, with and without `use_wal=True`. In the 40 kills of the probe, no committed vertex or edge chunk was lost, no record was torn, no edge pointed at a missing vertex, and every database reopened and accepted writes. The example below is one of these kills: 30,000 vertices and 70,000 edge records were in the database afterwards. diff --git a/docs/modules/ROOT/pages/how-to/errors.adoc b/docs/modules/ROOT/pages/how-to/errors.adoc index 92ba75b7..46d3d00d 100644 --- a/docs/modules/ROOT/pages/how-to/errors.adoc +++ b/docs/modules/ROOT/pages/how-to/errors.adoc @@ -83,7 +83,8 @@ A code that the table does not know is not an empty answer: `e.code` is `unknown == The codes -One row for each code. A row with more than one engine exception matches any of them. The engine exception is matched by its Java class name. A failure that the Python layer raises itself, or that one package words differently, is matched by its text, after the rows that match a class. The first row that matches decides. +// REMOVE WHEN: ArcadeData/arcadedb-python#544 merges; it gives these subclasses rows of their own. +One row for each code. A row with more than one engine exception matches any of them. The engine exception is matched by its Java class name, and the name must be the same: a subclass of a listed exception that has no row of its own, for example `RecordVetoedException` (a `ValidationException`) or `DatabaseIsReopeningException` (a `DatabaseIsClosedException`), gets the code `unknown` unless a rule on its text matches (https://github.com/ArcadeData/arcadedb-python/issues/507[#507]). A failure that the Python layer raises itself, or that one package words differently, is matched by its text, after the rows that match a class. The first row that matches decides. [cols="2,2,3,5"] |=== diff --git a/docs/modules/ROOT/pages/which-package.adoc b/docs/modules/ROOT/pages/which-package.adoc index d318f1e1..1f94347a 100644 --- a/docs/modules/ROOT/pages/which-package.adoc +++ b/docs/modules/ROOT/pages/which-package.adoc @@ -141,12 +141,16 @@ The API is the same. The runtime is not. These are the differences you can plan | `start_jvm` and the `-X` and `-D` flags do not exist, because there is no JVM. `jvm_kwargs` is accepted and ignored, with a logged warning. | Available. See xref:installation.adoc#jvm-options[JVM options]. +| The text of `Result.to_json()` +| In an SQL projection a `DATE` is a number of days and a `DATETIME` a number of epoch milliseconds, and a `DATETIME_MICROS` loses its microseconds in either SQL row. A `FLOAT` is the exact `float64` that it widens to. +| In an SQL projection a `DATE` is a number of epoch milliseconds and a `DATETIME` is text in the date-time format of the schema, and a `DATETIME_MICROS` is text. A `FLOAT` is the shortest `float32` text. + | A few API calls | None, except the Java-object calls above, which raise `NotOnNativeYet` (a `NotImplementedError`). | Work. |=== -Both packages run the same ArcadeDB engine, with the same SQL and openCypher and the same database format. +Both packages run the same ArcadeDB engine, with the same SQL and openCypher and the same database format. For rows that a program must read alike on both packages, use `to_json_list()`, which returns the same values on both: the cases are on xref:how-to/databases-and-queries.adoc#results[Results]. [[engine-of-post4]] === The engine of 26.11.1.post4