Skip to content

feat: add GraphBLAS serialization primitives#372

Merged
AviAvni merged 1 commit intomainfrom
graphblas-serialization
Apr 14, 2026
Merged

feat: add GraphBLAS serialization primitives#372
AviAvni merged 1 commit intomainfrom
graphblas-serialization

Conversation

@AviAvni
Copy link
Copy Markdown
Contributor

@AviAvni AviAvni commented Apr 14, 2026

Summary

Core serialization infrastructure that all higher-level RDB persistence code depends on. Extracted from #359 (PR 4 of the split).

  • New serialization.rs module (~219 lines): Writer/Reader traits abstracting serialization sinks/sources, versioned Encode<V>/Decode<V> traits, si_type type-tag constants (matching C FalkorDB format), EncodeState/PayloadEntry for chunked virtual-key encoding, and RoaringTreemap encode/decode for deleted entity bitmaps
  • Matrix encode/decode (~268 lines added): Encode<19>/Decode<19> for SparseMatrix using GxB_Container export/import, plus SparseMatrixIterator
  • Vector encode/decode (~229 lines added): Encode<19>/Decode<19> for SparseVector using container export/import, plus SparseVectorIterator
  • Tensor encode/decode (~148 lines added): Encode<19>/Decode<19> looping over inner matrices
  • VersionedMatrix encode/decode (~72 lines added): Delegates to underlying matrix
  • Dependencies: roaring and thin-vec added to root Cargo.toml

Test plan

  • cargo check passes
  • cargo fmt --all -- --check passes
  • CI build and test pipeline passes
  • Verify no regressions in existing unit tests (cargo test -p graph)

…atrix/vector/tensor serialization)

Introduce core serialization infrastructure for RDB persistence:
- Writer/Reader traits abstracting over serialization sinks/sources
- Encode<V>/Decode<V> traits for versioned serialization
- si_type module with type tag constants matching C FalkorDB format
- EncodeState/PayloadEntry for chunked virtual-key encoding
- Matrix, Vector, Tensor, VersionedMatrix Encode<19>/Decode<19> impls
  using GxB_Container export/import
- RoaringTreemap Encode<19>/Decode<19> for deleted entity bitmaps

Part of #359 (RDB persistence split).
@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 24 minutes and 3 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 24 minutes and 3 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: b8a59c2f-3b44-4849-9ec4-53ab518d2600

📥 Commits

Reviewing files that changed from the base of the PR and between b5de7b2 and b464eb2.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • Cargo.toml
  • graph/src/graph/graphblas/matrix.rs
  • graph/src/graph/graphblas/mod.rs
  • graph/src/graph/graphblas/serialization.rs
  • graph/src/graph/graphblas/tensor.rs
  • graph/src/graph/graphblas/vector.rs
  • graph/src/graph/graphblas/versioned_matrix.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch graphblas-serialization

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 2.29645% with 468 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.14%. Comparing base (b5de7b2) to head (b464eb2).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
graph/src/graph/graphblas/vector.rs 0.00% 142 Missing ⚠️
graph/src/graph/graphblas/matrix.rs 8.19% 112 Missing ⚠️
graph/src/graph/graphblas/tensor.rs 1.04% 95 Missing ⚠️
graph/src/graph/graphblas/serialization.rs 0.00% 88 Missing ⚠️
graph/src/graph/graphblas/versioned_matrix.rs 0.00% 31 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #372      +/-   ##
==========================================
- Coverage   85.50%   84.14%   -1.37%     
==========================================
  Files         109      110       +1     
  Lines       28477    28954     +477     
==========================================
+ Hits        24350    24362      +12     
- Misses       4127     4592     +465     
Flag Coverage Δ
fuzz 42.20% <2.08%> (-0.20%) ⬇️

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.

@AviAvni AviAvni merged commit a5ffccd into main Apr 14, 2026
14 of 16 checks passed
@AviAvni AviAvni deleted the graphblas-serialization branch April 14, 2026 12:35
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