Repository navigation
Example 21: query the graph analytical view once after a reopen, then wait for its counts - #37
Merged
Merged
Conversation
… 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>
8 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:graphAnalyticalViewsreports READY withnodeCount0 andedgeCount0 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 newwait_for_gav_countshelper until the row is READY with the expected counts.The original also changed
docs/examples/21_graph_analytical_view_sql.mdanddocs/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