Skip to content

Fix/548 commit completes atomically - #550

Merged
StevenBtw merged 19 commits into
release/0.5.45from
fix/548-commit-completes-atomically
Oct 4, 2026
Merged

StevenBtw merged 19 commits into
release/0.5.45from
fix/548-commit-completes-atomically

Conversation

@StevenBtw

@StevenBtw StevenBtw commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Fixes #

How was it tested?

AI assistance

AI tools used:

  • I have read every line of this change, I understand it, and I can explain and defend it in review.

Contributor checklist

  • No naming or concept conflicts. I searched the code, issues and discussions for the names this change introduces.
  • Agreed scope. New dependencies, crates, feature flags or CI changes were asked for in the linked issue or agreed in a discussion.

Summary by cubic

Fixes #548: commits now complete atomically. Previously a direct write, or another transaction writing what the committing one wrote, could hide the committed value from point-in-time reads, remove it on rollback, or cause two commits to replay in the wrong order after a crash; a transaction beginning during a commit could miss it.

TransactionManager::start_commit returns a CommitGuard that keeps the transaction in a new Committing state and holds a commit lock until the commit's versions, events and WAL records are written, so no other commit, transaction start, or direct write can run in between. Adds a feature-gated commit hook and integration tests, including crash-and-replay WAL coverage.

Rollout

  • Breaking: the minimum Rust version is now 1.99.0 (was 1.91.1), updated in CI, workspace metadata and docs.
  • The next release is renumbered from 0.5.45 to 0.6.0 because an MSRV or stable-surface breaking change bumps the minor version before 1.0; the versioning policy is now documented in the contributing guide.
  • Mechanical clippy fixes updated assert! calls throughout to include failure messages.
  • Miri fixes dropped Copy from the Python IsolationLevel enum and moved to the renamed try_update atomic method.

Written for commit e307161. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread crates/grafeo-engine/src/transaction/manager.rs
Comment thread crates/grafeo-engine/src/session/mod.rs
Comment thread crates/grafeo-engine/tests/commit_completion.rs
Comment thread crates/grafeo-engine/src/transaction/manager.rs
Comment thread crates/grafeo-engine/src/session/mod.rs
@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.45201% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/grafeo-core/src/graph/traits.rs 86.95% 3 Missing ⚠️
...grafeo-core/src/graph/compact/deletions_section.rs 66.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Benchmark Comparison (base vs PR)

Measured on the same runner to eliminate hardware variance.

Full results
group                                                 base                                   pr
-----                                                 ----                                   --
_memory_flush                                         1.01      0.2±0.00ns        ? ?/sec    1.00      0.2±0.00ns        ? ?/sec
adjacency_insert_1000                                 1.02     25.9±0.60µs        ? ?/sec    1.00     25.5±1.61µs        ? ?/sec
adjacency_lookup                                      1.03     40.1±3.42µs        ? ?/sec    1.00     39.0±0.47µs        ? ?/sec
brute_force_knn_1k_k10                                1.02     19.0±0.25µs        ? ?/sec    1.00     18.6±0.33µs        ? ?/sec
bump_allocate_1000                                    1.06    558.6±9.74ns        ? ?/sec    1.00   527.1±10.74ns        ? ?/sec
compact/edges_from_outgoing_10K                       1.00   323.8±27.47µs        ? ?/sec    1.04   338.3±26.49µs        ? ?/sec
compact/find_nodes_by_property/dict_eq/1000           1.09  1069.3±56.67ns        ? ?/sec    1.00   981.9±65.70ns        ? ?/sec
compact/find_nodes_by_property/dict_eq/10000          1.04      6.1±0.51µs        ? ?/sec    1.00      5.8±0.16µs        ? ?/sec
compact/find_nodes_by_property/dict_eq/100000         1.00     46.9±1.38µs        ? ?/sec    1.15     54.0±1.13µs        ? ?/sec
compact/find_nodes_by_property/int_eq/1000            1.05  1911.5±16.10ns        ? ?/sec    1.00  1823.8±352.93ns        ? ?/sec
compact/find_nodes_by_property/int_eq/10000           1.04     15.5±0.09µs        ? ?/sec    1.00     14.9±0.18µs        ? ?/sec
compact/find_nodes_by_property/int_eq/100000          1.00    144.9±3.17µs        ? ?/sec    1.03    148.8±4.19µs        ? ?/sec
compact/find_nodes_in_range/score_gt_7/1000           1.00      3.3±0.23µs        ? ?/sec    1.05      3.4±0.19µs        ? ?/sec
compact/find_nodes_in_range/score_gt_7/10000          1.00     28.5±0.62µs        ? ?/sec    1.06     30.3±1.08µs        ? ?/sec
compact/find_nodes_in_range/score_gt_7/100000         1.03   306.8±62.32µs        ? ?/sec    1.00    298.2±2.28µs        ? ?/sec
compact/get_node_property_10K                         1.00    122.7±5.48µs        ? ?/sec    1.01    124.5±2.33µs        ? ?/sec
compact/nodes_by_label_100K                           1.07     20.4±0.20µs        ? ?/sec    1.00     19.0±0.30µs        ? ?/sec
distance/cosine_384d                                  1.02     35.3±1.89ns        ? ?/sec    1.00     34.5±0.26ns        ? ?/sec
distance/dot_product_384d                             1.00     16.6±0.18ns        ? ?/sec    1.01     16.8±0.17ns        ? ?/sec
distance/euclidean_384d                               1.00     21.4±0.19ns        ? ?/sec    1.01     21.8±0.33ns        ? ?/sec
edge_filter/regression_edge_filter_any                1.00    453.8±2.35µs        ? ?/sec    1.01    458.3±9.95µs        ? ?/sec
edge_filter/regression_edge_filter_follows            1.00    455.9±7.95µs        ? ?/sec    1.00    457.9±7.71µs        ? ?/sec
edge_filter/regression_edge_filter_single             1.00    408.2±1.86µs        ? ?/sec    1.13   460.7±14.28µs        ? ?/sec
epoch_arena_allocate_1000                             1.05     15.6±0.08µs        ? ?/sec    1.00     14.9±0.11µs        ? ?/sec
hash_index_insert_1000                                1.01     32.3±0.74µs        ? ?/sec    1.00     32.0±0.26µs        ? ?/sec
hash_index_lookup                                     1.00     11.1±0.06µs        ? ?/sec    1.00     11.1±0.09µs        ? ?/sec
hnsw_insert_500                                       1.02     23.8±0.72ms        ? ?/sec    1.00     23.3±0.16ms        ? ?/sec
hnsw_search_2k_k10                                    1.00     69.6±3.12µs        ? ?/sec    1.00     69.7±2.32µs        ? ?/sec
memory_10k_nodes_50k_edges                            1.00     37.9±0.60ms        ? ?/sec    1.04     39.3±1.08ms        ? ?/sec
memory_1k_nodes_5k_edges                              1.00      3.3±0.03ms        ? ?/sec    1.06      3.5±0.07ms        ? ?/sec
memory_after_100_queries                              1.07     27.6±0.59ms        ? ?/sec    1.00     25.9±0.59ms        ? ?/sec
memory_empty_db                                       1.00     55.3±1.07µs        ? ?/sec    1.02     56.6±0.26µs        ? ?/sec
memory_vector_index_1k                                1.00     53.2±0.91ms        ? ?/sec    1.00     53.2±1.01ms        ? ?/sec
multihop/regression_1hop_1k                           1.02    238.2±2.42µs        ? ?/sec    1.00    233.5±7.25µs        ? ?/sec
multihop/regression_1hop_5k                           1.06  1413.3±17.21µs        ? ?/sec    1.00  1331.3±132.43µs        ? ?/sec
multihop/regression_2hop_1k                           1.00    252.5±7.07µs        ? ?/sec    1.03    261.0±1.98µs        ? ?/sec
multihop/regression_3hop_1k                           1.00    301.3±4.90µs        ? ?/sec    1.02   308.3±11.03µs        ? ?/sec
multihop/regression_fan_out_5k                        1.00      2.8±0.09ms        ? ?/sec    1.01      2.8±0.29ms        ? ?/sec
object_pool_get_put_1000                              1.00      2.5±0.03µs        ? ?/sec    1.00      2.5±0.01µs        ? ?/sec
product_quantization/asymmetric_distance_128d_pq8     1.00     27.4±0.48µs        ? ?/sec    1.03     28.3±3.52µs        ? ?/sec
product_quantization/build_distance_table_128d_pq8    1.03     28.2±3.72µs        ? ?/sec    1.00     27.4±0.44µs        ? ?/sec
product_quantization/distance_with_table_pq8          1.00      2.6±0.13ns        ? ?/sec    1.01      2.6±0.06ns        ? ?/sec
product_quantization/quantize_128d_pq8                1.00      8.9±0.21µs        ? ?/sec    1.07      9.6±0.50µs        ? ?/sec
product_quantization/train_500x128_pq8                1.00     23.7±0.40ms        ? ?/sec    1.00     23.7±0.43ms        ? ?/sec
query_1hop_pattern                                    1.07   246.6±15.14µs        ? ?/sec    1.00    231.4±8.48µs        ? ?/sec
query_2hop_pattern                                    1.00    254.2±3.76µs        ? ?/sec    1.00    253.3±2.25µs        ? ?/sec
query_count_all                                       1.02     25.6±0.55µs        ? ?/sec    1.00     25.1±0.30µs        ? ?/sec
query_fan_out_expand_1k                               1.01   541.6±31.95µs        ? ?/sec    1.00    536.3±9.97µs        ? ?/sec
query_filter_range                                    1.02    226.1±3.20µs        ? ?/sec    1.00   222.4±10.70µs        ? ?/sec
query_insert_single_node                              1.00      6.8±0.39µs        ? ?/sec    1.11      7.6±0.42µs        ? ?/sec
query_node_lookup_by_property                         1.07    237.1±1.78µs        ? ?/sec    1.00    222.4±3.26µs        ? ?/sec
rdf_chain_join                                        1.00    239.7±2.75µs        ? ?/sec    1.08    258.2±1.43µs        ? ?/sec
rdf_count_all                                         1.00    115.6±1.71µs        ? ?/sec    1.02    117.5±3.76µs        ? ?/sec
rdf_filter_string                                     1.00   197.7±17.92µs        ? ?/sec    1.06   209.6±12.42µs        ? ?/sec
rdf_insert_single_triple                              1.00      3.0±1.22ms        ? ?/sec    1.05      3.2±1.31ms        ? ?/sec
rdf_join_chain_10k                                    1.00      2.6±0.08ms        ? ?/sec    1.07      2.8±0.06ms        ? ?/sec
rdf_join_chain_2hop_10k                               1.00      5.9±0.49ms        ? ?/sec    1.06      6.3±0.64ms        ? ?/sec
rdf_join_optional_10k                                 1.00      6.6±0.15ms        ? ?/sec    1.00      6.6±0.58ms        ? ?/sec
rdf_join_star_2_10k                                   1.00      8.3±0.19ms        ? ?/sec    1.25     10.4±1.65ms        ? ?/sec
rdf_join_star_3_10k                                   1.00     16.8±0.35ms        ? ?/sec    1.09     18.3±2.18ms        ? ?/sec
rdf_join_star_4_10k                                   1.00     22.1±0.35ms        ? ?/sec    1.06     23.5±0.40ms        ? ?/sec
rdf_optional_pattern                                  1.00    586.8±9.80µs        ? ?/sec    1.05   618.0±87.37µs        ? ?/sec
rdf_single_pattern_lookup                             1.00      2.7±0.12µs        ? ?/sec    1.06      2.9±0.16µs        ? ?/sec
rdf_star_join_2pattern                                1.00   771.4±16.21µs        ? ?/sec    1.04    802.0±4.86µs        ? ?/sec
rdf_star_join_3pattern                                1.00  1387.8±20.24µs        ? ?/sec    1.07  1478.1±12.30µs        ? ?/sec
repeated/regression_repeat_cached_500                 1.05    119.7±1.53ms        ? ?/sec    1.00    114.5±4.58ms        ? ?/sec
repeated/regression_repeat_unique_100                 1.06     24.3±0.75ms        ? ?/sec    1.00     22.9±0.97ms        ? ?/sec
repeated/regression_repeat_unique_500                 1.02    117.1±1.38ms        ? ?/sec    1.00    115.1±4.24ms        ? ?/sec
scalar_quantization/distance_u8_384d                  1.01    270.9±9.51ns        ? ?/sec    1.00    267.9±8.12ns        ? ?/sec
scalar_quantization/quantize_384d                     1.00    192.1±1.64ns        ? ?/sec    1.01    193.2±7.66ns        ? ?/sec
scalar_quantization/train_1000x384                    1.01     89.8±0.76µs        ? ?/sec    1.00     89.0±1.52µs        ? ?/sec
snapshot_export_50n_100e                              1.03     56.5±1.01µs        ? ?/sec    1.00     54.9±0.46µs        ? ?/sec
snapshot_import_50n_100e                              1.00    145.2±0.79µs        ? ?/sec    1.00    145.6±0.99µs        ? ?/sec
snapshot_roundtrip_50n_100e                           1.03    218.3±4.19µs        ? ?/sec    1.00    212.1±1.70µs        ? ?/sec
value_decode_mixed_6                                  1.13    158.0±2.41ns        ? ?/sec    1.00    140.0±4.23ns        ? ?/sec
value_encode_mixed_6                                  1.01    102.9±9.83ns        ? ?/sec    1.00    101.5±1.60ns        ? ?/sec

Performance regressions

Benchmark Regression Threshold
rdf_join_star_2_10k +25.0% 12%

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 125 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread crates/grafeo-core/src/graph/lpg/store/versioning.rs
Comment thread .github/workflows/ci.yml
@StevenBtw
StevenBtw merged commit c392e25 into release/0.5.45 Oct 4, 2026
12 checks passed
@StevenBtw
StevenBtw deleted the fix/548-commit-completes-atomically branch October 4, 2026 16:34
StevenBtw added a commit that referenced this pull request Oct 4, 2026
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