Skip to content

New cache implementation for the server#2607

Open
ljeub-pometry wants to merge 25 commits into
db_v4from
gql_cache
Open

New cache implementation for the server#2607
ljeub-pometry wants to merge 25 commits into
db_v4from
gql_cache

Conversation

@ljeub-pometry
Copy link
Copy Markdown
Collaborator

@ljeub-pometry ljeub-pometry commented May 13, 2026

What changes were proposed in this pull request?

  • new cache based on quick_cache
  • no more evicting of dirty graphs
  • atomic replace of cached graphs
  • specifying port=0 for server start now works
  • starting a server without specifying a port now falls back to using an arbitrary port if the default port is in use
  • python tests now work even if there is a graphql server running on 1736
  • server startup no longer pings the network interface to figure out if the server has started (it uses messaging between threads instead).

Why are the changes needed?

  • race conditions in the server when replacing graphs

Does this PR introduce any user-facing change? If yes is this documented?

How was this patch tested?

  • improved the tests such that they fail when the flush on drop fails (but only when compiled with a special test feature)

Are there any further changes required?

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: a97712a Previous: 9823ef7 Ratio
lotr_graph/num_edges 3 ns/iter (± 0) 0 ns/iter (± 0) +∞
lotr_graph/num_nodes 3 ns/iter (± 0) 1 ns/iter (± 0) 3
lotr_graph/graph_latest 2 ns/iter (± 0) 0 ns/iter (± 0) +∞
lotr_graph_materialise/materialize 6113640 ns/iter (± 8981) 1564816 ns/iter (± 35303) 3.91
lotr_graph_window_100/num_nodes 11 ns/iter (± 0) 5 ns/iter (± 0) 2.20
lotr_graph_window_100/iterate_exploded_edges 670769 ns/iter (± 1214) 325242 ns/iter (± 847) 2.06
lotr_graph_window_100_materialise/materialize 6526413 ns/iter (± 19681) 1669150 ns/iter (± 10700) 3.91
lotr_graph_window_10/iterate nodes 26767 ns/iter (± 40) 11339 ns/iter (± 40) 2.36
lotr_graph_window_10/iterate_exploded_edges 326315 ns/iter (± 540) 155788 ns/iter (± 1001) 2.09
lotr_graph_window_10_materialise/materialize 2815635 ns/iter (± 6382) 971980 ns/iter (± 4278) 2.90
lotr_graph_subgraph_10pc_materialise/materialize 1279120 ns/iter (± 12799) 334634 ns/iter (± 1287) 3.82
lotr_graph_subgraph_10pc_windowed/has_node_existing 125 ns/iter (± 8) 62 ns/iter (± 14) 2.02
lotr_graph_subgraph_10pc_windowed/iterate nodes 4518 ns/iter (± 71) 1365 ns/iter (± 3) 3.31
lotr_graph_subgraph_10pc_windowed_materialise/materialize 785861 ns/iter (± 8734) 230399 ns/iter (± 2617) 3.41
lotr_graph_window_50_layered/has_node_existing 347 ns/iter (± 18) 129 ns/iter (± 12) 2.69
lotr_graph_window_50_layered/iterate nodes 62557 ns/iter (± 515) 19308 ns/iter (± 47) 3.24
lotr_graph_window_50_layered_materialise/materialize 26422755 ns/iter (± 165109) 3488825 ns/iter (± 24948) 7.57
lotr_graph_persistent_window_50_layered/num_edges_temporal 541196 ns/iter (± 5663) 192686 ns/iter (± 1569) 2.81
lotr_graph_persistent_window_50_layered/has_node_existing 393 ns/iter (± 289) 174 ns/iter (± 83) 2.26
lotr_graph_persistent_window_50_layered/iterate nodes 86422 ns/iter (± 1453) 35886 ns/iter (± 191) 2.41
lotr_graph_persistent_window_50_layered/iterate_exploded_edges 3880521 ns/iter (± 7594) 1659940 ns/iter (± 19402) 2.34
lotr_graph_persistent_window_50_layered_materialise/materialize 48034811 ns/iter (± 121405) 5298035 ns/iter (± 147912) 9.07
lotr_graph/proto_encode 7398617 ns/iter (± 46165) 1157897 ns/iter (± 73709) 6.39

This comment was automatically generated by workflow using github-action-benchmark.

@ljeub-pometry ljeub-pometry marked this pull request as ready for review May 13, 2026 15:31
github-actions Bot and others added 20 commits May 13, 2026 19:31
…rver is started without giving a specific port
…oid any potential ordering issues in the test
… are dropped before the directory is deleted
…deleted before the graph is dropped and enable panic on drop for graphql tests by default
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