Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/modules/ROOT/pages/how-to/bulk-loads.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion docs/modules/ROOT/pages/how-to/errors.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
|===
Expand Down
6 changes: 5 additions & 1 deletion docs/modules/ROOT/pages/which-package.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down