MuhammadTahaNaveed commented on PR #2561: URL: https://github.com/apache/age/pull/2561#issuecomment-5751910709
I compared `1d7eb331` with its parent, `0e305662`, on PostgreSQL 18.3 and found four issues: - **Running two traversals together loses results.** In my test, one traversal returned only 4 paths instead of the expected 6. The same query returns all 6 on the parent commit. Starting the second traversal frees cached data that the first still needs. The cache also gets rebuilt repeatedly: a query over 400 edges checks the edge policy 160,000 times. See `01-active-traversal-lifetime.sql` and `05-repeated-cache-loading.sql`. - **`vertex_stats()` can crash the database connection.** `MATCH (n)` can return vertices that the new cache has filtered out. Calling `vertex_stats(n)` then crashes the PostgreSQL backend because it assumes those vertices are still in the cache. The query completes on the parent commit. See `02-vertex-stats-missing-entry.sql`. - **Granting SELECT on all user columns is no longer enough.** With RLS enabled, a variable-length match fails with `permission denied`, although the fixed-length match works. The new loaders also read `ctid`, which those column grants do not cover. See `03-column-only-grants.sql`. - **Hiding every vertex produces an error.** When a policy filters out all vertices, traversal raises `age_vle: empty graph`. It should return no paths. See `04-empty-visible-graph.sql`. The statistics crash and empty graph error come from older code that needs updating for the new filtering behavior. Please keep cached data alive until all operations using it have finished, and handle missing vertices and empty results. Each SQL file includes its own setup. Run the statistics case last on an isolated test instance because it reproduces backend termination. **Review assisted by gpt-6-astra max** [05-repeated-cache-loading.sql](https://github.com/user-attachments/files/32441314/05-repeated-cache-loading.sql) [04-empty-visible-graph.sql](https://github.com/user-attachments/files/32441315/04-empty-visible-graph.sql) [03-column-only-grants.sql](https://github.com/user-attachments/files/32441316/03-column-only-grants.sql) [02-vertex-stats-missing-entry.sql](https://github.com/user-attachments/files/32441317/02-vertex-stats-missing-entry.sql) [01-active-traversal-lifetime.sql](https://github.com/user-attachments/files/32441318/01-active-traversal-lifetime.sql) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
