diff --git a/benchmarks/experiments/FAIRNESS.md b/benchmarks/experiments/FAIRNESS.md index 25956a20f8e..e1fe2153d1e 100644 --- a/benchmarks/experiments/FAIRNESS.md +++ b/benchmarks/experiments/FAIRNESS.md @@ -52,7 +52,7 @@ Fitting the pool is resource fitting, the first of the four sanctioned override | Memgraph 3.13.1 (2026-09-17) | `SHOW CONFIG` under `--cpuset-cpus 0-11` on a 16-CPU laptop: `bolt_num_workers` 16 and `storage_snapshot_thread_count` 16, both documented as "the number of processing units available on the machine"; 51 tasks in `/proc/1/task` at idle. Its memory limit is host-sized the same way (`memory_limit` 0 reported as 30.35 GiB inside an 8g container) | **host**; fitted: runner passes `--bolt-num-workers={ncpu}`, `--storage-snapshot-thread-count={ncpu}` and `--memory-limit` at 90% of the cap, and the adapter reads all three back onto the row (`memgraph_bolt_workers`, `memgraph_snapshot_threads`, `memgraph_memory_limit_mib`; 12, 12, 7372 on the laptop smoke at an 8g cap) The cross-model arm (`memgraph_e2`, from the 26.10.1 measurement) gets the same flags and reads the same settings back. | | FalkorDB 4.20.6 (2026-09-17; 6.0.1 from 2026-10-02 sizes the query pool from the cpuset, `THREAD_COUNT` 4 under a 4-CPU cpuset, and keeps the explicit setting) | startup log under the same cpuset: "Thread pool created, using 16 threads" and "Maximum number of OpenMP threads set to 12"; `GRAPH.CONFIG GET THREAD_COUNT` 16, `OMP_THREAD_COUNT` 12. The query pool reads the host's logical cores, the GraphBLAS pool reads the affinity mask | **host** for the query pool, cpuset for OpenMP; fitted: runner passes `THREAD_COUNT {ncpu}` in `FALKORDB_ARGS`, the log then reads "using 12 threads" and the adapter records `falkordb_thread_count` and `falkordb_omp_threads` from `GRAPH.CONFIG GET` (12 and 12 on the laptop smoke) | | LadybugDB 0.20.4 (2026-09-29, BUGS F160) | not audited on 2026-08-01 nor listed as owed; found from LadybugDB/ladybug#1070: `CALL current_setting("threads")` reads the host's CPU count under a cpuset (16 under `--cpuset-cpus 4-7` on the 16-CPU laptop, affinity 4), which is 20 on mini's 12-CPU cells, and the buffer pool defaults to 0.8 of physical RAM, about 49 GB against the 24 GB cell cap. A laptop A/B on the lane's own adapter at 20 against 12 threads put its reads 12-28% slow and its writes 12% fast | **host**; fitted 2026-09-29: the adapter passes `max_num_threads` from `sched_getaffinity` and `buffer_pool_size` at 0.8 of the cgroup `memory.max`, reads the thread count back, and records `ladybug_threads` and `ladybug_buffer_pool_mib` (4 and 3276 in a 4-CPU, 4 GB container); its rows are re-run in the 26.10.1 measurement. The cross-model arm (`ladybug_e2`, from the 26.10.1 measurement) opens through the same fit and records `ladybug_threads` and `ladybug_buffer_pool_mib`. | -| PostgreSQL + AGE 1.8.0 on PostgreSQL 18.6 (2026-10-02, both AGE arms) | `SHOW` under an 8-CPU cpuset and a 16 GiB cap: `max_parallel_workers_per_gather` 2 and `work_mem` 4MB, PostgreSQL's fixed defaults rather than host-sized ones, so not F6's bug as stated; but every other engine's pools reach the cell's cores and cap, and these reach 3 of 12 cores and spill rather than use the cap. Measured on the full SF1 network (`repros/age-dialect/resource_fit_probe.py`): workers fitted to the cpuset made LSQB q2 1.8x faster and q4, q5, q7 1.1-1.25x; `work_mem` fitted from the cap cut temp-file spill from 42 GB to 0.7 GB per analytics pass at no net time cost, with no OOM kill; four times that bought nothing | **fixed default**; fitted: the runner passes `max_parallel_workers_per_gather` and `max_parallel_maintenance_workers` = cpuset - 1, `max_parallel_workers` = cpuset, and `work_mem` = (cap x 0.75) / (cpuset x 16), and the graph adapter reads every one back onto the row (`pg_*`); the cross-model rows carry them in `server_cmd` | +| PostgreSQL + AGE 1.8.0 on PostgreSQL 18.6 (2026-10-02, both AGE arms) | `SHOW` under an 8-CPU cpuset and a 16 GiB cap: `max_parallel_workers_per_gather` 2 and `work_mem` 4MB, PostgreSQL's fixed defaults rather than host-sized ones, so not F6's bug as stated; but every other engine's pools reach the cell's cores and cap, and these reach 3 of 12 cores and spill rather than use the cap. Measured on the full SF1 network (a one-off probe on 2026-10-02, not kept in the repository): workers fitted to the cpuset made LSQB q2 1.8x faster and q4, q5, q7 1.1-1.25x; `work_mem` fitted from the cap cut temp-file spill from 42 GB to 0.7 GB per analytics pass at no net time cost, with no OOM kill; four times that bought nothing | **fixed default**; fitted: the runner passes `max_parallel_workers_per_gather` and `max_parallel_maintenance_workers` = cpuset - 1, `max_parallel_workers` = cpuset, and `work_mem` = (cap x 0.75) / (cpuset x 16), and the graph adapter reads every one back onto the row (`pg_*`); the cross-model rows carry them in `server_cmd` | | PostgreSQL 18.6 arms: `postgres_tuned`, `timescaledb`, `pgvector_dense`, `pgvector_sparse`, and the new `postgres_ts` (2026-10-02) | the same fixed defaults as AGE's (2 workers per query, a pool of 8, `work_mem` 4MB; `postgres_tuned` carried a constant 64MB). Same-run A/B on the laptop, defaults against fitted (`BENCH_PG_FIT=off`), answers identical in every pair, no OOM kill: TPC-H Q1 at SF1 on `postgres_tuned` 1.47x faster fitted, Q6 1.13x; the plain-table time series' per-host hourly aggregate 1.35x, its other queries unchanged, and q_last on the same plan either way (EXPLAIN, interleaved in one session); TimescaleDB unchanged within run noise; pgvector dense and sparse search unchanged and recall equal (0.997 and 0.94 both ways), the HNSW build a little faster with more maintenance workers | **fixed default**; fitted with AGE's rule through `runner.PG_FIT_CMD` on every PostgreSQL arm except `postgres`, the defaults arm by design; the time-series arms read every setting back onto the row (`pg_*`), the others carry them in `server_cmd`. `BENCH_PG_FIT=off` exists for the A/B only | The comparators this audit did not cover (MongoDB, QuestDB, SurrealDB, SQLite, and ArangoDB) are not yet audited, and memory pools have been checked for a host-sized default only where one was found (Memgraph's memory limit and LadybugDB's buffer pool, BUGS F160); CAMPAIGN.md section 7, item 20 carries both. diff --git a/benchmarks/experiments/PAGE-SPEC.md b/benchmarks/experiments/PAGE-SPEC.md index f888d38985b..d85cb97fedc 100644 --- a/benchmarks/experiments/PAGE-SPEC.md +++ b/benchmarks/experiments/PAGE-SPEC.md @@ -255,7 +255,7 @@ Six maximum. A figure per table is a gallery, not an argument. | `f7_e2_hybrid` | published | cross-model transaction latency | | `f8_deployment` | published | embedded against server across result sizes; refuses to draw across two pins | | `f6_memory_ceiling` | generated (`results/generated/figures`), not on the page | peak anon at DEEP-10M, ArcadeDB bars at the 24g heap | -| `f3_sparse_perquery` | not built (CAMPAIGN.md section 7, row 35) | per-query latency against summed posting length (Spearman 0.95 on the pre-pin rows) | +| `f3_sparse_perquery` | not drawn: `make_paper_figures.py` has it and skips it until every `results/sparse_cliff.jsonl` row carries an engine version (CAMPAIGN.md section 7, row 35) | per-query latency against summed posting length (Spearman 0.95 on the pre-pin rows) | | `f9_build_cost` | not built (CAMPAIGN.md section 7, row 35) | build seconds per engine per lane, log scale. The largest ArcadeDB deficit on the page and currently only trailing columns. | | `f10_lifecycle` | candidate, not built (CAMPAIGN.md section 7, row 35) | close ms against rows, per situation, log-log | diff --git a/bindings/python/docs/api/database.md b/bindings/python/docs/api/database.md index cefd618c9b4..530f92617b9 100644 --- a/bindings/python/docs/api/database.md +++ b/bindings/python/docs/api/database.md @@ -855,7 +855,7 @@ load many vertices and edges efficiently. - `batch_size`: buffered edge batch size - `expected_edge_count`: tuning hint for large graph loads - `light_edges`: create property-less edges as light edges - Warning: from ArcadeDB 26.11.1, `light_edges=True` raises `ArcadeDBError` from `new_edge` for an edge type that is not declared `LIGHTWEIGHT`; declare it with `CREATE EDGE TYPE ... LIGHTWEIGHT` or leave the option out. On 26.10.1 and earlier the load succeeds but an openCypher one-hop `count(*)` over those edges answers 0, and a graph loaded that way stays wrong; see [Known Engine Issues](../guide/known-issues.md#an-opencypher-one-hop-count-answers-0-for-edges-loaded-with-light_edgestrue-into-a-type-that-is-not-lightweight) for the workaround. + Warning: from ArcadeDB 26.10.2, `light_edges=True` raises `ArcadeDBError` from `new_edge` for an edge type that is not declared `LIGHTWEIGHT`; declare it with `CREATE EDGE TYPE ... LIGHTWEIGHT` or leave the option out. On 26.10.1 and earlier the load succeeds but an openCypher one-hop `count(*)` over those edges answers 0, and a graph loaded that way stays wrong; see [Known Engine Issues](../guide/known-issues.md#fixed-in-26102). - `commit_every`: commit cadence during flush - `use_wal`: enable WAL for higher durability - `parallel_flush`: parallelize flush/close work diff --git a/bindings/python/docs/api/graph_batch.md b/bindings/python/docs/api/graph_batch.md index afd4469f1b7..079065740fd 100644 --- a/bindings/python/docs/api/graph_batch.md +++ b/bindings/python/docs/api/graph_batch.md @@ -31,7 +31,7 @@ Create a configured batch helper tied to the current database. a single flush is the optimal shape - `edge_list_initial_size`: initial size in bytes of each vertex's edge segment - `light_edges`: create property-less light edges when appropriate - Warning: from ArcadeDB 26.11.1, `light_edges=True` raises `ArcadeDBError` from `new_edge` for an edge type that is not declared `LIGHTWEIGHT`; declare it with `CREATE EDGE TYPE ... LIGHTWEIGHT` or leave the option out. On 26.10.1 and earlier the load succeeds but an openCypher one-hop `count(*)` over those edges answers 0, and a graph loaded that way stays wrong; see [Known Engine Issues](../guide/known-issues.md#an-opencypher-one-hop-count-answers-0-for-edges-loaded-with-light_edgestrue-into-a-type-that-is-not-lightweight) for the workaround. + Warning: from ArcadeDB 26.10.2, `light_edges=True` raises `ArcadeDBError` from `new_edge` for an edge type that is not declared `LIGHTWEIGHT`; declare it with `CREATE EDGE TYPE ... LIGHTWEIGHT` or leave the option out. On 26.10.1 and earlier the load succeeds but an openCypher one-hop `count(*)` over those edges answers 0, and a graph loaded that way stays wrong; see [Known Engine Issues](../guide/known-issues.md#fixed-in-26102). - `bidirectional`: store each edge on both vertices (the default) or on its source only. Pass `False` only for an edge type declared one-way (`CREATE EDGE TYPE ... UNIDIRECTIONAL`). A one-way edge in a two-way type (the default `CREATE EDGE TYPE`) diff --git a/bindings/python/docs/api/results.md b/bindings/python/docs/api/results.md index 84c659d8e75..777bdeefc68 100644 --- a/bindings/python/docs/api/results.md +++ b/bindings/python/docs/api/results.md @@ -137,10 +137,11 @@ keeps the Python types, so the two cost about the same. **Trade-off:** values carry JSON-native types. Numbers, strings, booleans, lists, and nested maps convert as expected, but `DATE` and `DATETIME` values arrive as epoch-millisecond integers (not `datetime`) and DECIMALs as floats. A `DATE` is the -epoch milliseconds of midnight UTC, whatever the JVM's time zone, so it is the same -integer `Result.to_json()` writes and `datetime.fromtimestamp(ms / 1000, timezone.utc)` -gives the right day. Use `to_list()` when you want `date`, `datetime`, and `Decimal` -values: it costs about the same. +epoch milliseconds of midnight UTC, whatever the JVM's time zone, so +`datetime.fromtimestamp(ms / 1000, timezone.utc)` gives the right day. `Result.to_json()` +is the engine's own JSON, which writes a `DATE` property as days since the epoch (19724 for +2024-01-02), so the two differ for a `DATE`. Use `to_list()` when you want `date`, +`datetime`, and `Decimal` values: it costs about the same. A one-row read through `to_json_list()` takes one Java crossing (a short batch ends the read), and `to_list()` reads a short result the same way. diff --git a/bindings/python/docs/api/schema.md b/bindings/python/docs/api/schema.md index 528cde941f1..a8037070d8c 100644 --- a/bindings/python/docs/api/schema.md +++ b/bindings/python/docs/api/schema.md @@ -419,9 +419,11 @@ schema.create_index("Article", ["content"], index_type="FULL_TEXT") in ascending order (ArcadeDB [#9169](https://github.com/ArcadeData/arcadedb/issues/9169), 200,000 and 2,000,000 entries). It cannot serve a range or an `ORDER BY`. - Use `LSM_TREE` when you need ranges, sorting, or a safe general-purpose default, and for - a non-unique column with few distinct values (in the 26.10.1 wheel a `NOTUNIQUE_HASH` + a non-unique column with few distinct values on 26.10.1 and earlier (there a `NOTUNIQUE_HASH` insert costs more with every row the key already has, ArcadeDB - [#9228](https://github.com/ArcadeData/arcadedb/issues/9228), fixed for 26.11.1). + [#9228](https://github.com/ArcadeData/arcadedb/issues/9228), fixed in 26.10.2 by + [#9538](https://github.com/ArcadeData/arcadedb/pull/9538); an existing index needs `REBUILD INDEX` + for the fix). - Use `FULL_TEXT`, `LSM_VECTOR`, and `GEOSPATIAL` only for their specialized query types. - `HASH` can be unique or non-unique. The index structure and uniqueness constraint are diff --git a/bindings/python/docs/development/release.md b/bindings/python/docs/development/release.md index b37e91ddf9a..577207825db 100644 --- a/bindings/python/docs/development/release.md +++ b/bindings/python/docs/development/release.md @@ -127,7 +127,7 @@ The tag push starts the release workflow, which builds and publishes the wheels. "import json,sys; fs=json.load(sys.stdin)['urls']; print(len(fs)); [print(f['filename'], f['size']) for f in sorted(fs, key=lambda f: f['filename'])]" ``` - `scripts/after_tag_verify.sh ` (optionally followed + `scripts/after_tag_verify.sh []` (optionally followed by the engine jar's sha256 and build number) does the whole check in one command and prints PASS or FAIL for each step: the run and the publish job's own conclusion, the file set against the previous release, every file's sha256 against the run's artifact, `pip download` for the @@ -317,7 +317,7 @@ git tag -a X.Y.Z.post1 -m "Python hotfix release X.Y.Z.post1" test "$(git rev-parse 'X.Y.Z.post1^{}')" = "$(git rev-parse HEAD)" && echo "tag OK" git push origin X.Y.Z.post1 -# 5. Create GitHub Release, only after PyPI shows every wheel (step 5 above) +# 5. Create GitHub Release, only after PyPI shows every wheel (step 6 above) gh release create X.Y.Z.post1 -R humemai/arcadedb-embedded-python --verify-tag \ --title "X.Y.Z.post1" \ --notes "Hotfix for critical bug in X.Y.Z" diff --git a/bindings/python/docs/development/testing.md b/bindings/python/docs/development/testing.md index c14f2059bac..cc3d910d2f0 100644 --- a/bindings/python/docs/development/testing.md +++ b/bindings/python/docs/development/testing.md @@ -135,8 +135,8 @@ asserts, so the list below stops at the file. | File | What it checks | | --- | --- | | `test_docs_examples.py` | Python blocks from the documentation run as code; see [Documentation example tests](#documentation-example-tests) | -| `test_count_pushdown_known_issues.py` | The openCypher count push-down and `BYTE` aggregate entries on [Known Engine Issues](../guide/known-issues.md): their workarounds pass, and plain regression tests assert the right answer (fixed in 26.11.1; they fail on the 26.10.1 wheel) | -| `test_light_edge_and_view_known_issues.py` | The two openCypher count entries on [Known Engine Issues](../guide/known-issues.md) (a one-hop `count(*)` over `light_edges=True` edges in an edge type that is not `LIGHTWEIGHT`, and a pattern predicate over an edge type that a Graph Analytical View does not list): their workarounds pass, and plain regression tests assert the refusal and the right counts (fixed in 26.11.1; they fail on the 26.10.1 wheel). | +| `test_count_pushdown_known_issues.py` | Regression tests for the openCypher count push-down fixes and the `BYTE` aggregate fix that shipped in 26.10.2, with the workarounds that were documented for them (they fail on the 26.10.1 wheel) | +| `test_light_edge_and_view_known_issues.py` | Regression tests for the two openCypher count fixes that shipped in 26.10.2 (a one-hop `count(*)` over `light_edges=True` edges in an edge type that is not `LIGHTWEIGHT`, and a pattern predicate over an edge type that a Graph Analytical View does not list): the refusal and the right counts, with the workarounds that were documented for them (they fail on the 26.10.1 wheel) | | `test_null_index_known_issues.py`, `test_declared_type_known_issues.py`, `test_dml_plan_cache_known_issues.py` | Plain regression tests for engine bugs that 26.10.1 fixed (null keys and index lookups, declared properties, positional parameters in a cached DML plan), with the workarounds that were documented for them | ## Markers diff --git a/bindings/python/docs/development/upstream-bindings-pr.md b/bindings/python/docs/development/upstream-bindings-pr.md index 1107521eb51..66a9722bc01 100644 --- a/bindings/python/docs/development/upstream-bindings-pr.md +++ b/bindings/python/docs/development/upstream-bindings-pr.md @@ -57,7 +57,7 @@ What the script does beyond that: most recently as which version, then explain each file that crosses outside `bindings/python` and why, show the result of upstream's checks on the first push, and state the scope. In a release cycle the pull request comes last, after the release and - the sync that follows it ([Release Workflow](release.md#7-open-the-upstream-pull-request-last)). + the sync that follows it ([Release Workflow](release.md#8-open-the-upstream-pull-request-last)). ## What upstream expects diff --git a/bindings/python/docs/getting-started/installation.md b/bindings/python/docs/getting-started/installation.md index 859c87a86b9..03712f0573a 100644 --- a/bindings/python/docs/getting-started/installation.md +++ b/bindings/python/docs/getting-started/installation.md @@ -19,7 +19,7 @@ pip install arcadedb-embedded ## What's Included The `arcadedb-embedded` package includes everything you need. The Linux x86_64 wheel of -26.10.1 is 69.4 MiB to download and 96.9 MiB unpacked (measured on the file on PyPI); +26.10.2 is 70.2 MiB to download and 97.8 MiB unpacked (measured on the file on PyPI); other platforms are in the same range: | Platform | Wheel tag (Python 3.12) | Download | diff --git a/bindings/python/docs/guide/core/queries.md b/bindings/python/docs/guide/core/queries.md index 8e093df6798..918a64c6fc3 100644 --- a/bindings/python/docs/guide/core/queries.md +++ b/bindings/python/docs/guide/core/queries.md @@ -441,9 +441,11 @@ for ids loaded in ascending order, which is the best case of `LSM_TREE`. So the equality only and not loaded in key order; an id you number as you load pays that on the insert and gains on every read. Keep `UNIQUE` (`LSM_TREE`) when you also read the key by range or `ORDER BY`, and keep an `LSM_TREE` index on a non-unique column with few distinct -values: in the 26.10.1 wheel an insert into a `NOTUNIQUE_HASH` index costs more with every row -the key already has ([#9228](https://github.com/ArcadeData/arcadedb/issues/9228), fixed by -[#9538](https://github.com/ArcadeData/arcadedb/pull/9538) for 26.11.1, which is not released yet). +values on 26.10.1 and earlier: there an insert into a `NOTUNIQUE_HASH` index costs more with every +row the key already has ([#9228](https://github.com/ArcadeData/arcadedb/issues/9228)). It is fixed +in 26.10.2 by [#9538](https://github.com/ArcadeData/arcadedb/pull/9538): a key with many RIDs keeps +them in a chain of pages, for new indexes and for existing ones after `REBUILD INDEX`. A server from +before the fix (26.10.1) refuses an index file in the new layout. ```python db.command("sql", "CREATE INDEX ON Item (id) UNIQUE_HASH") # id: equality only diff --git a/bindings/python/docs/guide/known-issues.md b/bindings/python/docs/guide/known-issues.md index 8369ca63494..d4938ecff4e 100644 --- a/bindings/python/docs/guide/known-issues.md +++ b/bindings/python/docs/guide/known-issues.md @@ -1,14 +1,12 @@ # Known Engine Issues -These are ArcadeDB engine bugs that can return a wrong answer, store a wrong value, change -the wrong rows, or refuse a read or a write. The entries about Ctrl-C and about memory held by -results are not engine bugs: they are in JPype, the library that connects Python to the engine. Each entry names the versions -it was measured on, what you see, a workaround that was checked on the same reproduction, and -the release that fixes it once there is one. Entries leave this page when the fix ships in a -release these bindings package. -An entry with a `Tests:` line has a test of its workaround. An entry for a bug that -is fixed on upstream's main but not yet in a release says so, and its plain regression tests pass on the -engine the suite builds against and fail on the released wheel until the next release ships. +This page lists the known bugs that can return a wrong answer, store a wrong value, change the +wrong rows, or refuse a read or a write. The two entries now on it, about Ctrl-C and about memory +held by results, are not engine bugs: they are in JPype, the library that connects Python to the +engine. Each entry names the versions it was measured on, what you see, a workaround that was +checked on the same reproduction, and the release that fixes it once there is one. Entries leave +this page when the fix ships in a release these bindings package. +An entry with a `Tests:` line has a test of its workaround. ## Ctrl-C during an interruptible Java wait can raise `InterruptedException`, not `KeyboardInterrupt` @@ -103,255 +101,13 @@ rather than a `get()` per value, or upgrade JPype to the release that carries th objects with `sys.getallocatedblocks()` before and after a read to see whether your path is affected. -## An openCypher one-hop `count(*)` answers 0 for edges loaded with `light_edges=True` into a type that is not `LIGHTWEIGHT` +## Fixed in 26.10.2 -ArcadeDB [#9378](https://github.com/ArcadeData/arcadedb/issues/9378); measured through the -bindings on the 26.10.1 wheel (the official jars are upstream build d36b4ca3ae), and in Java on that -build and on upstream main 246821a605, on Temurin 21 and 25, with the same answers. Fixed upstream -for new loads by [ArcadeData/arcadedb#9383](https://github.com/ArcadeData/arcadedb/pull/9383), merged -on 2026-10-07 for ArcadeDB 26.11.1, which is not released yet. The 26.10.1 wheel still has the bug. -The fix does not repair a database that an older version already wrote. +These entries left the page when 26.10.2 shipped. On 26.10.1, upgrade: `pip install -U arcadedb-embedded`. -`db.graph_batch(light_edges=True)` writes each edge that has no properties as a light edge, one -with no record of its own. When the edge type is an ordinary one (`CREATE EDGE TYPE E`, not -`CREATE EDGE TYPE E LIGHTWEIGHT`), a `MATCH` of one hop that ends in `RETURN count(*)` is answered -by the count push-down from the number of records in the type, and the type holds none. On three -vertices a, b, and c with the edges a to b and b to c, loaded that way on 26.10.1: - -```python -db.command("sql", "CREATE VERTEX TYPE V") -db.command("sql", "CREATE EDGE TYPE E") -with db.graph_batch(light_edges=True) as batch: - a, b, c = batch.create_vertices("V", 3) - batch.new_edge(a, "E", b) - batch.new_edge(b, "E", c) - -db.query("opencypher", "MATCH (a:V)-[:E]->(b:V) RETURN count(*) AS n").first().get("n") # 0, not 2 -``` - -`EXPLAIN` of that query shows `CONSTANT COUNT (0: the pattern has an empty or undeclared type)`. -The edges are in the graph: the same pattern returning rows gives 2, the two-hop count gives 1, and -SQL `out('E')` finds both. The wrong count does not depend on the session: it is the same after the -database is closed and opened again. It also holds for `<-[:E]-`, for an undirected `-[:E]-`, and -for unlabelled nodes. A type declared `LIGHTWEIGHT`, a batch with `light_edges=False`, and a -batch that does not pass `light_edges` all counted 2 in the same run. - -**In 26.11.1** the batch refuses the load. `new_edge` raises `ArcadeDBError`, and nothing is -written for that edge: - -``` -Failed to buffer batch edge 'E': java.lang.IllegalArgumentException: Edge type 'E' does not declare -LIGHTWEIGHT, so a batch built with withLightEdges(true) cannot store its property-less edges as -light edges. Declare the type with CREATE EDGE TYPE E LIGHTWEIGHT, or build the batch without -withLightEdges(true) -``` - -Edges with properties are not light edges and still load into an undeclared type. On the 26.11.1 -snapshot, the load above with `CREATE EDGE TYPE E LIGHTWEIGHT`, with `light_edges=False`, and -without the option all counted 2. - -On 26.10.1, do not pass `light_edges=True` for an edge type that is not declared `LIGHTWEIGHT`: -declare the type `LIGHTWEIGHT` before the load, or leave the option out. A `LIGHTWEIGHT` type -refuses an edge with properties (`IllegalArgumentException`). - -**A database that was already loaded that way stays wrong on 26.10.1.** The 26.11.1 snapshot counts -it right since upstream #9409 (closing #9389): its count push-down now finds the light edges in an -undeclared type (checked with two light edges written by the engine's `newLightEdge`: 2 on the -snapshot, 0 on 26.10.1). On 26.10.1, count in a way that does not take the push-down: put the -variables through a `WITH`, count a node, or name the relationship and count that. All three counted -2 on the 26.10.1 wheel and on the snapshot: - -```python -db.query("opencypher", "MATCH (a:V)-[:E]->(b:V) WITH a, b RETURN count(*) AS n") -db.query("opencypher", "MATCH (a:V)-[:E]->(b:V) RETURN count(b) AS n") -db.query("opencypher", "MATCH (a:V)-[r:E]->(b:V) RETURN count(r) AS n") -``` - -Tests: `tests/test_light_edge_and_view_known_issues.py` checks the workarounds, the refusal, and the -cases that are not affected. The refusal test is plain and passes on the engine the suite builds -against (upstream's 26.11.1 snapshot, which has the fix) and fails on the 26.10.1 wheel, and so does -the test of the count over light edges that an older version wrote (a strict `xfail` until #9409). -Remove the 26.10.1 part of this entry when the release that carries the fix ships. - - -## An openCypher count with a pattern predicate over an edge type that a Graph Analytical View does not list is wrong - -ArcadeDB [#9377](https://github.com/ArcadeData/arcadedb/issues/9377); measured through the -bindings on the 26.10.1 wheel (the official jars are upstream build d36b4ca3ae), and in Java on that -build and on upstream main 246821a605, on Temurin 21 and 25, with the same answers. Fixed upstream by -[ArcadeData/arcadedb#9383](https://github.com/ArcadeData/arcadedb/pull/9383), merged on 2026-10-07 -for ArcadeDB 26.11.1, which is not released yet: a predicate over an edge type the view does not -list now reads the record. The 26.10.1 wheel still has the bug, and the workarounds below are -still needed on it. - -A Graph Analytical View copies the structure of the vertex and edge types it lists -(`CREATE GRAPH ANALYTICAL VIEW ... VERTEX TYPES (...) EDGE TYPES (...)`), and a query that the -view can serve is answered from the copy. A view that lists the edge types of the chain in a -`MATCH` but not an edge type that a pattern predicate in its `WHERE` names is still used for an -aggregate, and the predicate is then checked against the copy, where the unlisted type has no -edges. On the vertices x, y, and z of type `V` with the edges x `-E->` y, x `-F->` y, and -y `-E->` z, and a view over `V` and `E`, the pair (x, y) has an `F` edge, so the right count of each -query below is 1. The 26.10.1 view answered: - -| Query over the view that lists `E` only | Counted | Right | -| --- | --- | --- | -| `MATCH (a:V)-[:E]->(b:V) WHERE NOT (a)-[:F]->(b) RETURN count(*)` | 2 | 1 | -| `MATCH (a:V)-[:E]->(b:V) WHERE (a)-[:F]->(b) RETURN count(*)` | 0 | 1 | -| `MATCH (a:V)-[:E]->(b:V) WHERE NOT (a)-[:F]->(b) RETURN count(a)` | 2 | 1 | - -`EXPLAIN` of the first shows `GAV ONE-HOP SCAN` with the predicate as its filter. The same -predicates counted right with no view, with a view that lists `F` as well as `E`, behind a `WITH`, -and in a query that returns rows instead of an aggregate. The query returns no error and no -warning, only the wrong number. On the 26.11.1 snapshot all three counted 1, with the view still in -the plan. - -On 26.10.1, put the variables through a `WITH` before the `WHERE`, as for the count push-down -entries below. That keeps the query off the view, and counted 1 for both forms above. It gives up -the view's speed for that query. Or list every edge type that your pattern predicates name when you -create the view (`EDGE TYPES (E, F)`), which counted 1 as well: - -```python -db.query( - "opencypher", - "MATCH (a:V)-[:E]->(b:V) WITH a, b WHERE NOT (a)-[:F]->(b) RETURN count(*) AS n", -) -``` - -Tests: `tests/test_light_edge_and_view_known_issues.py` checks both workarounds and the cases that -are not affected, and has plain regression tests of the right counts. They pass on the engine the -suite builds against (upstream's 26.11.1 snapshot, which has the fix) and fail on the 26.10.1 -wheel. Remove this entry when the release that carries the fix ships. - - -## An openCypher count with a negated pattern in a chain is wrong when the far end has another label or the pattern has a property map - -ArcadeDB [#9277](https://github.com/ArcadeData/arcadedb/issues/9277) and -[#9278](https://github.com/ArcadeData/arcadedb/issues/9278); measured through the bindings on -26.10.1 (the official jars are upstream build d36b4ca3ae), and in Java on that build, on 26.9.1, and on -5a90b0f52a, on Temurin 21 and 25, with the same answers. Both are fixed upstream by -[ArcadeData/arcadedb#9288](https://github.com/ArcadeData/arcadedb/pull/9288), merged on 2026-10-06 for -ArcadeDB 26.11.1, which is not released yet. The 26.10.1 wheel still has both bugs. - -A `MATCH` chain of two or more hops that ends in `RETURN count(*)` and has a negated pattern -predicate between two of its nodes (`WHERE NOT (a)-[:R]-(c)`, alone or with `AND a <> c` or -`AND id(a) <> id(c)`) is answered by a count push-down; `EXPLAIN` lists `COUNT ANTI-JOIN -CHAIN`. It counts wrong in two cases: - -- **Another label at the far end (#9277).** On the single path - `(x0:Person)-[:KNOWS]-(x1:Person)-[:KNOWS]-(y0:Employee)-[:HAS_INTEREST]->(t:Tag)`, in which - `x0` and `y0` are not connected, the chain `(p1:Person)...(p2:Person)...(p3:Employee)...(t:Tag)` - with `WHERE NOT (p1)-[:KNOWS]-(p3)` counted 0 where the answer is 1. The same holds with - `AND p1 <> p3`. A chain whose nodes all have the same label, and a far end that is a sub type - of the first labels, gave the right count in every case I ran. In 26.10.1, which carries - upstream #9271, `id(p1) <> id(p3)` takes the same push-down, so that spelling, which counted 1 - before, now counts 0. -- **A property map on the pattern's relationship (#9278).** The push-down drops it. With an edge - `x -[:K {w: 0}]-> z`, `WHERE NOT (x)-[:K {w: 1}]->(z)` counted 0 where the answer is 1, - because no edge with `w = 1` connects them; it was counted as `NOT (x)-[:K]->(z)`. - -Put the variables through a `WITH` before the `WHERE`. That keeps the query off the push-down, -and the row pipeline counted the right number in every case above. It gives up the push-down's -speed for that query: - -```python -chain = "MATCH (p1:Person)-[:KNOWS]-(p2:Person)-[:KNOWS]-(p3:Employee)-[:HAS_INTEREST]->(t:Tag) " -n = ( - db.query( - "opencypher", - chain + "WITH p1, p2, p3, t WHERE NOT (p1)-[:KNOWS]-(p3) RETURN count(*) AS n", - ) - .first() - .get("n") -) -``` - -Tests: `tests/test_count_pushdown_known_issues.py` checks the `WITH` workaround and the cases -that are not affected, and has plain regression tests of the right counts. They pass on the -engine the suite builds against (upstream's 26.11.1 snapshot, which has the fix) and fail on the -26.10.1 wheel. Remove this entry when the release that carries the fix ships. - - -## An openCypher count with a negated pattern is wrong for other shapes of the chain - -ArcadeDB [#9290](https://github.com/ArcadeData/arcadedb/issues/9290); measured through the -bindings on the 26.10.1 wheel, and in Java on 26.10.1, on upstream main cbf701d66e, and on the -head of the upstream fix for the entry above (#9288, head 7d69d5f534, merged for 26.11.1), on Temurin 21 -and 25, with the same answers. Fixed upstream by -[ArcadeData/arcadedb#9299](https://github.com/ArcadeData/arcadedb/pull/9299), merged on 2026-10-06 -for ArcadeDB 26.11.1, which is not released yet: the push-down now applies only to the one shape -the engine verifies against the row pipeline, and every other chain takes the row pipeline. The -26.10.1 wheel still has the bug, and the `WITH` workaround below is still needed on it. - -The count push-down of the entry above (`EXPLAIN` lists `COUNT ANTI-JOIN CHAIN`) is also wrong -for chains that are not the two-hop shape it is written for. On four people with `KNOWS` a-b, -b-c, c-d, and a-c, each interested in one tag, these counted more than the right number, with -the push-down in the plan: - -| Chain and `WHERE` | Counted | Right | -| --- | --- | --- | -| three `KNOWS` hops, `NOT (p0)-[:KNOWS]-(p2) AND p0 <> p2` | 6 | 2 | -| two hops and a tag, `NOT (p0)-[:KNOWS]-(p2) AND p1 <> p2` (an inequality between other nodes) | 12 | 4 | -| the same chain, `NOT (p0)-[:KNOWS]-(p2)` (no inequality) | 12 | 4 | -| three `KNOWS` hops, `NOT (p1)-[:KNOWS]-(p3) AND p1 <> p3` (the pattern not at the first node) | 10 | 2 | -| an unlabelled middle node, `NOT (p2)-[:KNOWS]-(p0) AND p2 <> p0` | 18 | 4 | - -The two-hop chain with a label on every node, the negated pattern between its first and third -node, and the inequality between the same two (the shape of the LSQB benchmark's Q9) counted -right (4). Put the variables through a `WITH` before the `WHERE`, as above; the row pipeline -counted the right number for every shape in the table: - -```python -chain = "MATCH (p0:Person)-[:KNOWS]-(p1:Person)-[:KNOWS]-(p2:Person)-[:HAS_INTEREST]->(t:Tag) " -n = ( - db.query( - "opencypher", - chain + "WITH p0, p1, p2, t WHERE NOT (p0)-[:KNOWS]-(p2) RETURN count(*) AS n", - ) - .first() - .get("n") -) -``` - -Tests: `tests/test_count_pushdown_known_issues.py` checks the `WITH` workaround and the unaffected -shape, and has plain regression tests of the right counts. They pass on the engine the suite builds -against (upstream's 26.11.1 snapshot, which has the fix) and fail on the 26.10.1 wheel. Remove this -entry when the release that carries the fix ships. - - -## `sum()` and `avg()` over a `BYTE` property raise `IllegalArgumentException` - -ArcadeDB [#9281](https://github.com/ArcadeData/arcadedb/issues/9281); measured through the -bindings on 26.10.1 (the official jars are upstream build d36b4ca3ae), and in Java on that build, on 26.9.1, and -on 5a90b0f52a, on Temurin 21 and 25. Fixed upstream by -[ArcadeData/arcadedb#9288](https://github.com/ArcadeData/arcadedb/pull/9288), merged on 2026-10-06 for -ArcadeDB 26.11.1, which is not released yet. The 26.10.1 wheel still has the bug. - -Over a property declared `BYTE`, `SELECT sum(b) FROM T` and `SELECT avg(b) FROM T` in SQL and -`MATCH (n:V) RETURN sum(n.b)` in openCypher raise `ArcadeDBError` (`Query failed: -java.lang.IllegalArgumentException: Cannot increment value '100' (class java.lang.Byte) with -'50' (class java.lang.Byte)`) once the aggregate has two rows to add. The same values in a -`SHORT` or `INTEGER` property sum and average as expected. - -Convert the value before the aggregate, `b.asInteger()` in SQL and `toInteger(n.b)` in -openCypher, or declare the property `SHORT`: - -```python -total = db.query("sql", "SELECT sum(b.asInteger()) AS total FROM T").first().get("total") -average = db.query("sql", "SELECT avg(b.asInteger()) AS average FROM T").first().get("average") -``` - -Tests: `tests/test_count_pushdown_known_issues.py` checks the conversion workaround and has plain -regression tests of the aggregates. They pass on the engine the suite builds against (upstream's -26.11.1 snapshot, which has the fix) and fail on the 26.10.1 wheel. Remove this entry when the -release that carries the fix ships. - - -## An async executor batch can run out of retries and be rolled back at parallel level 4 on a one-bucket type - -ArcadeDB [#9694](https://github.com/ArcadeData/arcadedb/issues/9694), which our issue [#99](https://github.com/humemai/arcadedb-embedded-python/issues/99) tracks. Upstream measured it on build fd407f1bc0 (a main build from after the 26.10.1 release) and on ac4f75d532 (#9535, which added a retry backoff): with the default settings, 20 of 6,000 and 24 of 6,000 runs of 9,742 single-row `INSERT` commands through the async executor lost a batch (4 workers, commit every 1,000, one bucket). Fixed upstream by [ArcadeData/arcadedb#9703](https://github.com/ArcadeData/arcadedb/pull/9703), merged on 2026-10-11 for ArcadeDB 26.11.1, which is not released yet. The 26.10.1 wheel was released before that fix and does not contain it. - -With several workers inserting into the same bucket, most batch commits conflicted and had to be replayed, so now and then a batch used up its retries. The batch is not dropped without a report: it is rolled back, its rows are not stored, and the executor's `on_error` handler fires once for it with a `ConcurrentModificationException`. Without an `on_error` handler on the executor nothing is raised in Python. - -Register `on_error` on the executor, and compare the stored count with the submitted count after `wait_completion()`. `command()` is not a bulk loader (see [AsyncExecutor](../api/async_executor.md)): use `Database.insert_many` for documents and `Database.graph_batch` for graphs. - -Our issue #99 stays open until the bindings carry an engine build with the fix. Remove this entry when the release that carries the fix ships. +- An openCypher one-hop `count(*)` answered 0 for edges loaded with `light_edges=True` into a type that is not `LIGHTWEIGHT`: [#9378](https://github.com/ArcadeData/arcadedb/issues/9378), fixed by [#9383](https://github.com/ArcadeData/arcadedb/pull/9383). The batch now refuses that load. +- An openCypher count with a pattern predicate over an edge type that a Graph Analytical View does not list was wrong: [#9377](https://github.com/ArcadeData/arcadedb/issues/9377), fixed by [#9383](https://github.com/ArcadeData/arcadedb/pull/9383). +- An openCypher count with a negated pattern in a chain was wrong when the far end had another label or the pattern had a property map: [#9277](https://github.com/ArcadeData/arcadedb/issues/9277) and [#9278](https://github.com/ArcadeData/arcadedb/issues/9278), fixed by [#9288](https://github.com/ArcadeData/arcadedb/pull/9288). +- An openCypher count with a negated pattern was wrong for other shapes of the chain: [#9290](https://github.com/ArcadeData/arcadedb/issues/9290), fixed by [#9299](https://github.com/ArcadeData/arcadedb/pull/9299). +- `sum()` and `avg()` over a `BYTE` property raised `IllegalArgumentException`: [#9281](https://github.com/ArcadeData/arcadedb/issues/9281), fixed by [#9288](https://github.com/ArcadeData/arcadedb/pull/9288). +- An async executor batch could run out of retries and be rolled back at parallel level 4 on a one-bucket type: [#9694](https://github.com/ArcadeData/arcadedb/issues/9694), fixed by [#9703](https://github.com/ArcadeData/arcadedb/pull/9703). diff --git a/bindings/python/docs/guide/server.md b/bindings/python/docs/guide/server.md index 5d40c609f52..faa4ea6cccc 100644 --- a/bindings/python/docs/guide/server.md +++ b/bindings/python/docs/guide/server.md @@ -279,13 +279,13 @@ your own workload before you change a client for these numbers. driver spends about 5 microseconds of Python per record and fetches 1,000 records per round trip by default; upstream measured it 4x to 10x slower than HTTP on large results and advises raising `fetch_size` (for example `driver.session(fetch_size=-1)`). That advice -was measured on ArcadeDB 26.11.1, which batches Bolt records. On the 26.10.1 server in -this wheel a 10,000-row result did not get faster with it when we tried. +was measured on an ArcadeDB 26.11.1-SNAPSHOT build, which batches Bolt records. On the 26.10.1 +server a 10,000-row result did not get faster with it when we tried. gRPC streaming with a batch size of 10,000 or more was the fastest route in upstream's measurement of results of hundreds of thousands of rows. At the default batch size it -was slower than HTTP in ours (a 10,000-row Cypher read took about 3.3x as long, on a -26.11.1 pre-release build), so set the batch size explicitly and measure. When your code +was slower than HTTP in ours (a 10,000-row Cypher read took about 3.3x as long, on an +ArcadeDB 26.11.1-SNAPSHOT build), so set the batch size explicitly and measure. When your code runs in the same process as the database (embedded mode), skip the socket and read a large result with [`to_arrow()`, `to_columns()`, or `to_list()`](../api/results.md). diff --git a/bindings/python/docs/guide/vectors.md b/bindings/python/docs/guide/vectors.md index 80455d84138..75e5758a12d 100644 --- a/bindings/python/docs/guide/vectors.md +++ b/bindings/python/docs/guide/vectors.md @@ -139,9 +139,9 @@ rebuild can be deferred indefinitely, and every search then pays a growing scan of the vectors not yet in the graph (ArcadeDB [#7260](https://github.com/ArcadeData/arcadedb/issues/7260)). Upstream fixed it in [#9289](https://github.com/ArcadeData/arcadedb/pull/9289), merged on -2026-10-06 for ArcadeDB 26.11.1, which is not released yet: the 26.10.1 wheel -still has it. A heap of about twice the graph, a lower `mutations_before_rebuild`, -or rebuilding in a quiet window avoids it. Read-mostly use, and loading first and +2026-10-06 and released in ArcadeDB 26.10.2; the 26.10.1 wheel still has it. On 26.10.1, a +heap of about twice the graph, a lower `mutations_before_rebuild`, or rebuilding in a quiet window +avoids it. Read-mostly use, and loading first and serving after, never meet it. ### Build-time cache: use the default diff --git a/bindings/python/examples/04_csv_import_documents.py b/bindings/python/examples/04_csv_import_documents.py index 7c0fc3f6aa8..8985cb339f1 100644 --- a/bindings/python/examples/04_csv_import_documents.py +++ b/bindings/python/examples/04_csv_import_documents.py @@ -1457,6 +1457,8 @@ def _flush_batch(batch_rows): # equality would be UNIQUE_HASH (ArcadeData/arcadedb#9169), as Link.movieId is. ("Movie", "movieId", "UNIQUE"), ("Movie", "genres", "FULL_TEXT"), # Full-text search for genre queries + # The NOTUNIQUE columns stay LSM_TREE: on 26.10.1 and earlier a NOTUNIQUE_HASH insert + # costs more with every row the key already has (ArcadeData/arcadedb#9228, fixed in 26.10.2). ("Rating", "userId", "NOTUNIQUE"), ("Rating", "movieId", "NOTUNIQUE"), ("Link", "movieId", "UNIQUE_HASH"), # never read by range or order diff --git a/bindings/python/tests/test_bridge_fixes.py b/bindings/python/tests/test_bridge_fixes.py index dec7f82c7be..6d86b8a62a8 100644 --- a/bindings/python/tests/test_bridge_fixes.py +++ b/bindings/python/tests/test_bridge_fixes.py @@ -70,13 +70,17 @@ def test_insert_many_nested_values_read_as_python_in_the_same_transaction( MIDNIGHT_UTC_2024_01_02 = 1704153600000 DAY_MS = 86_400_000 +EPOCH_DAY_2024_01_02 = MIDNIGHT_UTC_2024_01_02 // DAY_MS @pytest.mark.parametrize("zone", ["UTC", "Asia/Seoul", "America/Los_Angeles"]) def test_to_json_list_writes_a_date_as_midnight_utc_in_any_jvm_zone(tmp_path, zone): - """to_json_list wrote a DATE as midnight in the JVM's zone, so it disagreed - with Result.to_json() and decoded to the previous day east of UTC (#116). - Each zone needs its own JVM, hence the child process.""" + """to_json_list wrote a DATE as midnight in the JVM's zone, so it decoded to + the previous day east of UTC (#116). Each zone needs its own JVM, hence the + child process. Result.to_json() is the engine's own JSON and does not depend + on the zone either: it writes this undeclared LocalDate as midnight UTC + milliseconds up to 26.10.2 and, from ArcadeData/arcadedb#10253 (26.11.1), + as days since the epoch, as it writes a declared DATE in both.""" proc = subprocess.run( # nosec B603 - fixed argv, no shell, test-owned [sys.executable, "-c", _DATE_SCRIPT, str(tmp_path / "db"), zone], capture_output=True, @@ -88,7 +92,7 @@ def test_to_json_list_writes_a_date_as_midnight_utc_in_any_jvm_zone(tmp_path, zo batch, single = out["batch"], out["single"] assert batch["day"] == MIDNIGHT_UTC_2024_01_02 - assert batch["day"] == single["day"] + assert single["day"] in (MIDNIGHT_UTC_2024_01_02, EPOCH_DAY_2024_01_02) # a DATE inside a list or a map takes the same path assert batch["days"] == [MIDNIGHT_UTC_2024_01_02, MIDNIGHT_UTC_2024_01_02 + DAY_MS] assert batch["meta"] == {"on": MIDNIGHT_UTC_2024_01_02, "n": 1} diff --git a/bindings/python/tests/test_count_pushdown_known_issues.py b/bindings/python/tests/test_count_pushdown_known_issues.py index f14600702d7..3c968ca3c24 100644 --- a/bindings/python/tests/test_count_pushdown_known_issues.py +++ b/bindings/python/tests/test_count_pushdown_known_issues.py @@ -1,15 +1,12 @@ """Engine findings about openCypher count push-downs and BYTE aggregates that reach Python users -(known-issues.md), now all fixed in ArcadeDB 26.10.2. +(known-issues.md), all fixed in ArcadeDB 26.10.2. -Each finding has a test of its documented workaround, which must keep passing, and a test of the -engine behavior itself that asserts the answer the row pipeline gives. While an engine bug is open -that test is a strict `xfail`, a tripwire as in `test_null_index_known_issues.py`: when the fix -reaches the wheel it starts passing and the suite fails, and the test is then converted to a plain -one. - -#9277, #9278 and #9281 (ArcadeData/arcadedb#9288) and #9290 (ArcadeData/arcadedb#9299) are fixed in -26.10.2, which is the engine this tree builds against, so their tests are plain regression tests -now. They fail on the 26.10.1 engine, the one in the released wheel; known-issues.md says so. +Each finding has a test of its workaround, which must keep passing, and a plain regression test of +the engine behavior itself that asserts the answer the row pipeline gives. #9277, #9278 and #9281 +(ArcadeData/arcadedb#9288) and #9290 (ArcadeData/arcadedb#9299) are fixed in 26.10.2, so the +regression tests pass on the 26.10.2 wheel. While the bugs were open they were strict `xfail` +tripwires, as in `test_null_index_known_issues.py`. The bugs are listed under "Fixed in 26.10.2" in +known-issues.md. Where a query is still answered by the `COUNT ANTI-JOIN CHAIN` push-down (the LSQB Q9 shape, the only shape the engine verifies against the row pipeline since #9299) the test first checks the @@ -111,7 +108,7 @@ def test_negated_pattern_in_a_chain_with_another_label_at_the_far_end_counts_the ], ) def test_with_before_the_where_gives_the_row_pipeline_count(temp_db_path, where): - """known-issues.md (#9277): `WITH p1, p2, p3, t` before the WHERE keeps the query off the + """#9277 (fixed in 26.10.2): `WITH p1, p2, p3, t` before the WHERE keeps the query off the push-down and gives the right count on every engine.""" with arcadedb.create_database(temp_db_path) as db: _cross_label_graph(db) @@ -207,7 +204,7 @@ def test_negated_pattern_with_a_property_map_counts_the_path(temp_db_path, where ], ) def test_with_before_the_where_honours_the_property_map(temp_db_path, where, expected): - """known-issues.md (#9278): after a `WITH` the negated pattern keeps its property map.""" + """#9278 (fixed in 26.10.2): after a `WITH` the negated pattern keeps its property map.""" with arcadedb.create_database(temp_db_path) as db: _edge_property_graph(db) row_pipeline = f"{EDGE_CHAIN}WITH x, y, z, t WHERE {where} RETURN count(*) AS n" # nosec B608 @@ -253,7 +250,7 @@ def _byte_types(db): def _result_or_error(db, language, query, reported_error="Cannot increment value"): - """The value of `r`, or the text of the error the issue reports, so the tripwire's + """The value of `r`, or the text of the error the issue reports, so the regression test's comparison fails with it as with a wrong value; any other exception fails the suite. """ try: @@ -308,7 +305,7 @@ def test_sum_and_avg_over_a_short_property_are_not_affected(temp_db_path): def test_converting_a_byte_to_an_integer_before_the_aggregate_works( temp_db_path, language, query, expected ): - """known-issues.md (#9281): `b.asInteger()` in SQL and `toInteger(n.b)` in openCypher + """#9281 (fixed in 26.10.2): `b.asInteger()` in SQL and `toInteger(n.b)` in openCypher give the aggregate a value type it can add.""" with arcadedb.create_database(temp_db_path) as db: _byte_types(db) @@ -398,7 +395,7 @@ def test_the_push_down_counts_the_other_shapes_like_the_row_pipeline( def test_with_before_the_where_gives_the_row_pipeline_count_for_the_other_shapes( temp_db_path, match, variables, where, expected ): - """known-issues.md (#9290): `WITH ` before the WHERE keeps the query + """#9290 (fixed in 26.10.2): `WITH ` before the WHERE keeps the query off the push-down and gives the right count.""" with arcadedb.create_database(temp_db_path) as db: _shapes_graph(db) diff --git a/bindings/python/tests/test_declared_type_known_issues.py b/bindings/python/tests/test_declared_type_known_issues.py index 8da07d9c9a9..170e08e0a9d 100644 --- a/bindings/python/tests/test_declared_type_known_issues.py +++ b/bindings/python/tests/test_declared_type_known_issues.py @@ -1,10 +1,11 @@ """Engine findings about declared properties that reach Python users (known-issues.md). Each finding has a test of its documented workaround, which must keep passing, and a test -of the engine behavior itself. While the engine bug is open that test is a strict `xfail`, a +of the engine behavior itself. While an engine bug is open that test is a strict `xfail`, a tripwire as `test_restore_sql.py` used for #6096: when the fix reaches the wheel it starts passing and the suite fails. Once the fix is in the engine the wheel packages, the `xfail` -comes off and the test asserts the fixed behavior. +comes off and the test asserts the fixed behavior. Every finding here is fixed, so all the tests +are plain now. Upstream: ArcadeData/arcadedb #9014 and #9027 (a value that cannot be converted was stored as NULL, and '' as 0; fixed in 26.10.1 by PR #9121), #9017 (CREATE PROPERTY mandatory + diff --git a/bindings/python/tests/test_light_edge_and_view_known_issues.py b/bindings/python/tests/test_light_edge_and_view_known_issues.py index ecb59911aa7..5380f439617 100644 --- a/bindings/python/tests/test_light_edge_and_view_known_issues.py +++ b/bindings/python/tests/test_light_edge_and_view_known_issues.py @@ -1,12 +1,11 @@ """Engine findings about openCypher counts over light edges and over Graph Analytical Views that reach Python users (known-issues.md), both fixed in ArcadeDB 26.10.2. -Each finding has plain tests of its documented workarounds, which must keep passing, plain tests of -the cases that are not affected, and plain regression tests of the engine behavior itself. They pass -on the engine the suite builds against (upstream's 26.10.2 snapshot, which has the fix) and fail on -the 26.10.1 wheel; known-issues.md says so. While the bugs were open the regression tests were strict -`xfail` tripwires, as in `test_count_pushdown_known_issues.py`: they started passing when the fix -reached the snapshot, and the suite failed until they were converted. +Each finding has plain tests of its workarounds, which must keep passing, plain tests of the cases +that are not affected, and plain regression tests of the engine behavior itself. The regression +tests pass on the 26.10.2 wheel. While the bugs were open they were strict `xfail` tripwires, as in +`test_count_pushdown_known_issues.py`. The bugs are listed under "Fixed in 26.10.2" in +known-issues.md. Upstream: ArcadeData/arcadedb #9378 (a one-hop `count(*)` answered 0 over the edges that `GraphBatch.withLightEdges(true)` wrote into an edge type that is not declared `LIGHTWEIGHT`: the @@ -123,7 +122,7 @@ def test_light_edges_for_an_undeclared_edge_type_are_refused(temp_db_path): def test_one_hop_count_where_the_edges_and_the_type_agree( temp_db_path, edge_ddl, batch_options ): - """known-issues.md (#9378): declaring the type `LIGHTWEIGHT` before the load, or not passing + """#9378 (fixed in 26.10.2): declaring the type `LIGHTWEIGHT` before the load, or not passing `light_edges=True`, gives the right one-hop count on every engine.""" with arcadedb.create_database(temp_db_path) as db: _light_edge_graph(db, edge_ddl, **batch_options) @@ -164,7 +163,7 @@ def test_light_edges_with_properties_in_an_undeclared_type_are_regular_edges( ], ) def test_other_ways_to_count_light_edges_an_older_version_loaded(temp_db_path, query): - """known-issues.md (#9378): on a graph that an older version loaded with `light_edges=True` into + """#9378 (fixed in 26.10.2): on a graph that an older version loaded with `light_edges=True` into an undeclared type, a `WITH a, b` before the count, `count(b)`, or `count(r)` over a named relationship is not planned as `CONSTANT COUNT` and gives the right count, on every engine. """ @@ -178,9 +177,9 @@ def test_other_ways_to_count_light_edges_an_older_version_loaded(temp_db_path, q def test_one_hop_count_over_light_edges_an_older_version_loaded(temp_db_path): """The right count is 2, as the rows and `out('E')` show. Until ArcadeData/arcadedb#9409 (merge 9b6aaedd40, closing #9389) the push-down planned this CONSTANT COUNT and answered 0 for light edges - an older version had written; this was a strict `xfail` tripwire then. The snapshot now counts - them through the CSR chain-count push-down, so it is a plain regression test. It fails on the - 26.10.1 wheel.""" + an older version had written; this was a strict `xfail` tripwire then. Since 26.10.2 the engine + counts them through the CSR chain-count push-down, so it is a plain regression test. + """ with arcadedb.create_database(temp_db_path) as db: _graph_an_older_version_loaded(db) _require_the_edges_are_there(db) @@ -271,7 +270,7 @@ def test_pattern_predicate_over_an_edge_type_the_view_does_not_list( def test_with_before_the_where_gives_the_row_pipeline_count_over_a_view( temp_db_path, where ): - """known-issues.md (#9377): `WITH a, b` before the WHERE keeps the query on the row pipeline, + """#9377 (fixed in 26.10.2): `WITH a, b` before the WHERE keeps the query on the row pipeline, which counts the right number with the view that does not list F, on every engine. """ with arcadedb.create_database(temp_db_path) as db: @@ -290,7 +289,7 @@ def test_with_before_the_where_gives_the_row_pipeline_count_over_a_view( ], ) def test_a_view_that_lists_the_predicates_edge_type_counts_right(temp_db_path, where): - """known-issues.md (#9377): a view that lists F as well as E still serves the query, and the + """#9377 (fixed in 26.10.2): a view that lists F as well as E still serves the query, and the count is right, on every engine.""" with arcadedb.create_database(temp_db_path) as db: _view_graph(db, "E, F") diff --git a/bindings/python/tests/test_null_index_known_issues.py b/bindings/python/tests/test_null_index_known_issues.py index 74edcc7a207..873fc3ee9f8 100644 --- a/bindings/python/tests/test_null_index_known_issues.py +++ b/bindings/python/tests/test_null_index_known_issues.py @@ -11,8 +11,8 @@ Each test first checks that the query it asserts on is planned through the index (`FETCH FROM INDEX` in SQL, `NodeIndexSeek` in openCypher), so it cannot pass by comparing a scan with a scan, and that the type without an index still gives the expected answer. These -checks call `pytest.fail`, which the `xfail` marks do not absorb (`raises=AssertionError`): a -plan that stops reading the index fails the suite instead of staying an expected failure. An +checks call `pytest.fail`, so a plan that stops reading the index fails the suite. (While the bugs +were open, the `xfail` marks did not absorb it: `raises=AssertionError`.) An exception the issue reports is turned into an answer that fails the comparison; any other exception fails the suite too. diff --git a/sync-upstream.sh b/sync-upstream.sh index baf6ca1ebe1..a5a7b553efb 100755 --- a/sync-upstream.sh +++ b/sync-upstream.sh @@ -8,7 +8,7 @@ # Everything else, including bindings/python/, is merged normally from # upstream-main into main. # -# Usage: ./sync-upstream.sh [--help|--status|--dry-run] +# Usage: ./sync-upstream.sh [--help|--status|--dry-run] [--until ] set -e @@ -204,6 +204,13 @@ restore_protected_paths() { } # Show help +print_list() { + local item + for item in "$@"; do + echo " • $item" + done +} + show_help() { cat << EOF ${BLUE}🔄 Upstream Sync Script${NC} @@ -213,24 +220,22 @@ Syncs this fork with upstream ArcadeData/arcadedb while keeping: - main: fork changes merged with upstream-main ${YELLOW}Usage:${NC} - ./sync-upstream.sh Sync with upstream (interactive) - ./sync-upstream.sh --until - Sync only up to a specific upstream commit - ./sync-upstream.sh --dry-run Show what would be synced (no changes) - ./sync-upstream.sh --status Check sync status only - ./sync-upstream.sh --help Show this help + ./sync-upstream.sh Sync with upstream (asks before merging; non-interactive: printf y | ./sync-upstream.sh) + ./sync-upstream.sh --until Sync only up to a specific upstream commit + ./sync-upstream.sh --dry-run Show what would be synced (no changes) + ./sync-upstream.sh --status Check sync status only + ./sync-upstream.sh --help Show this help ${YELLOW}Fork-Owned Files (restored after merge):${NC} - • README.md - -${YELLOW}Fork-Excluded Files (kept out of the fork):${NC} - • CLAUDE.md - -${YELLOW}.github/ (ALLOWLIST — every other TRACKED file is pruned after the merge):${NC} - • .github/workflows/deploy-python-docs.yml - • .github/workflows/release-python-packages.yml - • .github/workflows/test-python-bindings.yml - • .github/workflows/test-python-examples.yml +EOF + print_list "${FORK_OWNED_PATHS[@]}" + echo "" + echo -e "${YELLOW}Fork-Excluded Files (kept out of the fork):${NC}" + print_list "${FORK_EXCLUDED_PATHS[@]}" + echo "" + echo -e "${YELLOW}.github/ (ALLOWLIST — every other TRACKED file is pruned after the merge):${NC}" + print_list "${FORK_GITHUB_ALLOWLIST[@]}" + cat << EOF Any other tracked file under .github/ is DELETED after each sync, and the prune names what it removed. This used to be a denylist of upstream @@ -244,8 +249,13 @@ ${YELLOW}.github/ (ALLOWLIST — every other TRACKED file is pruned after the me ${YELLOW}Normal Merge Paths:${NC} • bindings/python/ - Merges normally from upstream-main into main +${YELLOW}When the merge stops on conflicts:${NC} + Only the fork-owned and fork-excluded paths are resolved automatically; any + other conflict stops the script before the restore and the .github prune. + The steps are in bindings/python/docs/development/sync-upstream.md. + ${YELLOW}After Sync:${NC} -1. Test: cd bindings/python && ./scripts/build.sh linux/amd64 && pytest tests/ +1. Test: cd bindings/python && ./scripts/build.sh linux/amd64 && uv run pytest (or on Windows: ./scripts/build.sh windows/amd64; on macOS: ./scripts/build.sh darwin/arm64) 2. Push: git push origin main