Skip to content

Example 21: query the graph analytical view once after a reopen, then wait for its counts - #37

Merged
tae898 merged 1 commit into
mainfrom
port/fix-469
Oct 24, 2026
Merged

tae898 merged 1 commit into
mainfrom
port/fix-469

Conversation

@tae898

@tae898 tae898 commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Port of humemai/arcadedb-embedded-python#469 (merged there). Based on main.

After a reopen, a graph analytical view restored from its persisted CSR is lazy: schema:graphAnalyticalViews reports READY with nodeCount 0 and edgeCount 0 until the first query that uses the view (ArcadeData/arcadedb#10575). Example 21 polled the row until READY and then required the full counts, so on current engines (the 26.11.1 main engine) it failed intermittently, 2 of 3 runs at 67,500 nodes in the original PR. Results through the view were always correct; only the metadata row lags. The example now runs one query through the view after the reopen and then polls with a new wait_for_gav_counts helper until the row is READY with the expected counts.

The original also changed docs/examples/21_graph_analytical_view_sql.md and docs/guide/graph-analytics.md; neither page exists in this repo yet, so only the example (script docstring and code comments carry the explanation) is ported.

Checked locally on the released 26.10.2 linux x86_64 cp312 wheel, pinned taskset -c 0-3, JVM -Xmx3g, --base-cities 50000 --stale-growth-cities 12500 --sync-growth-cities 5000 (67,500 nodes): the fixed example ended with "Example 21 completed." in 2 of 2 runs. The unfixed example also completed in 1 run on 26.10.2, so this check shows no regression, not that the failure is reproduced; the failing case needs the unreleased main engine, which CI's nightly job (arcadedata/arcadedb:latest) exercises. pre-commit (black, isort) and Bandit (examples, medium/high) are clean. Example 21 has no test, so none was added.

No open PR touches this file.

🤖 Generated with Claude Code

… wait for its counts

After a reopen, a graph analytical view restored from its persisted CSR is lazy: schema:graphAnalyticalViews reports READY with nodeCount 0 and edgeCount 0 until the first query that uses the view (ArcadeData/arcadedb#10575). Example 21 polled the row until READY and then required the full counts, so on current engines it failed intermittently. The example now runs one query through the view after the reopen and then polls with a new wait_for_gav_counts helper until the row is READY with the expected counts.

Port of humemai/arcadedb-embedded-python#469.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tae898
tae898 merged commit 478c2f4 into main Oct 24, 2026
66 of 68 checks passed
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