Skip to content

feat: graph accessors, schema_version, sync indexes, resize refactor#378

Merged
AviAvni merged 1 commit intomainfrom
graph-accessors-schema-version
Apr 14, 2026
Merged

feat: graph accessors, schema_version, sync indexes, resize refactor#378
AviAvni merged 1 commit intomainfrom
graph-accessors-schema-version

Conversation

@AviAvni
Copy link
Copy Markdown
Contributor

@AviAvni AviAvni commented Apr 14, 2026

Summary

Split from #359. Adds public API surface needed by persistence and effects replication.

  • schema_version on Graph — tracks schema changes (new labels, types, attributes)
  • MvccGraph::from_graph() — construct from existing Graph for RDB load
  • Sync index creation/population — create_index_sync, populate_indexes_sync
  • New accessors: get_type_id_mut, max_relationship_id, deleted_*_count, label_matrices, relationship_tensors, attribute name helpers
  • Resize refactor: extract resize_node_matrices/resize_relationship_matrices helpers

Test plan

  • cargo check passes
  • cargo test -p graph passes
  • No behavioral changes — new methods and fields only

- Add schema_version field to Graph (incremented on schema changes)
- Add MvccGraph::from_graph() constructor and schema version tracking
- Add get_type_id_mut() for get-or-create relationship types
- Add inc_reserved_node_count/inc_reserved_relationship_count
- Add max_relationship_id, deleted_*_count, deleted_relationships accessors
- Add label_matrices(), relationship_tensors() accessors
- Add create_index_sync/populate_indexes_sync for synchronous index rebuild
- Add get_all_pending_fields() to Indexer
- Add attribute name accessors and build_global_attrs
- Extract resize_node_matrices/resize_relationship_matrices from resize()

Split from #359.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

Warning

Rate limit exceeded

@AviAvni has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 47 minutes and 32 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 47 minutes and 32 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dd1fce7b-57f4-49c3-9ae7-c6170b684afc

📥 Commits

Reviewing files that changed from the base of the PR and between 553c6ba and 2abe6b9.

📒 Files selected for processing (3)
  • graph/src/graph/graph.rs
  • graph/src/graph/mvcc_graph.rs
  • graph/src/index/indexer.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch graph-accessors-schema-version

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AviAvni AviAvni merged commit 2aef6e3 into main Apr 14, 2026
14 checks passed
@AviAvni AviAvni deleted the graph-accessors-schema-version branch April 14, 2026 13:17
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 21.27660% with 148 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.14%. Comparing base (d51f96e) to head (2abe6b9).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
graph/src/graph/graph.rs 15.38% 132 Missing ⚠️
graph/src/index/indexer.rs 0.00% 10 Missing ⚠️
graph/src/graph/mvcc_graph.rs 72.72% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #378      +/-   ##
==========================================
- Coverage   84.15%   83.14%   -1.02%     
==========================================
  Files         110      110              
  Lines       28963    29367     +404     
==========================================
+ Hits        24375    24418      +43     
- Misses       4588     4949     +361     
Flag Coverage Δ
fuzz 41.36% <3.19%> (-0.53%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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