Skip to content

fix(storage): avoid panic for overlong path prefixes - #727

Open
QuantumExplorer wants to merge 1 commit into
developfrom
codex/fix-680-overlong-path-prefix
Open

fix(storage): avoid panic for overlong path prefixes#727
QuantumExplorer wants to merge 1 commit into
developfrom
codex/fix-680-overlong-path-prefix

Conversation

@QuantumExplorer

Copy link
Copy Markdown
Member

Summary

  • keep the legacy prefix body unchanged for valid <=255-byte path segments
  • route overlong path segments through a separate length-delimited prefix body before hashing
  • update prefix tests so 256-byte segments no longer panic and max-size valid segments retain legacy layout

Fixes #680.

Notes

Storage context construction currently returns CostContext, not CostResult, so this avoids the process abort without a broad storage-trait API change.

Verification

  • cargo test -p grovedb-storage --features rocksdb_storage test_build_prefix
  • cargo test -p grovedb-storage --features rocksdb_storage

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

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

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ 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: 7652b633-575b-49b6-9b90-95bd2bde9c37

📥 Commits

Reviewing files that changed from the base of the PR and between 60f2968 and ecf66df.

📒 Files selected for processing (1)
  • storage/src/rocksdb_storage/storage.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-680-overlong-path-prefix

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

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.42%. Comparing base (60f2968) to head (ecf66df).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #727   +/-   ##
========================================
  Coverage    91.42%   91.42%           
========================================
  Files          236      236           
  Lines        67053    67069   +16     
========================================
+ Hits         61305    61321   +16     
  Misses        5748     5748           
Components Coverage Δ
grovedb-core 88.94% <ø> (ø)
merk 92.26% <ø> (ø)
storage 86.51% <100.00%> (+0.14%) ⬆️
commitment-tree 96.43% <ø> (ø)
mmr 96.76% <ø> (ø)
bulk-append-tree 89.26% <ø> (ø)
element 97.36% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@QuantumExplorer QuantumExplorer changed the title Avoid panicking on overlong path prefixes fix(storage): avoid panic for overlong path prefixes May 21, 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.

[audit][low] Overlong path segments can panic RocksDB prefix construction

1 participant