Skip to content

fix: prevent PrefixDB from closing underlying DB and copying prefix#283

Merged
swift1337 merged 4 commits intocometbft:mainfrom
songgaoye:fix_prefixdb_flaw
Jan 27, 2026
Merged

fix: prevent PrefixDB from closing underlying DB and copying prefix#283
swift1337 merged 4 commits intocometbft:mainfrom
songgaoye:fix_prefixdb_flaw

Conversation

@songgaoye
Copy link
Copy Markdown
Contributor

@songgaoye songgaoye commented Jan 23, 2026


PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)

Note

  • PrefixDB behavior: NewPrefixDB now defensively copies prefix (cp(prefix)), and Close() is a no-op to avoid closing the underlying DB.
  • Build tooling: Updates tools/Dockerfile to use RocksDB 9.11.2.

Written by Cursor Bugbot for commit f6ee7c5. This will update automatically on new commits. Configure here.

@songgaoye songgaoye requested review from a team as code owners January 23, 2026 05:10
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 26, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.50%. Comparing base (fb4f703) to head (c67e67e).
⚠️ Report is 76 commits behind head on main.

Files with missing lines Patch % Lines
prefixdb.go 33.33% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #283      +/-   ##
==========================================
+ Coverage   76.80%   78.50%   +1.69%     
==========================================
  Files          23       23              
  Lines        2048     1698     -350     
==========================================
- Hits         1573     1333     -240     
+ Misses        403      292     -111     
- Partials       72       73       +1     
Files with missing lines Coverage Δ
prefixdb.go 73.87% <33.33%> (+3.52%) ⬆️

... and 21 files with indirect coverage changes

Files with missing lines Coverage Δ
prefixdb.go 73.87% <33.33%> (+3.52%) ⬆️

... and 21 files with indirect coverage changes

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

@cursor
Copy link
Copy Markdown

cursor bot commented Jan 27, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on February 16.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@swift1337 swift1337 added this pull request to the merge queue Jan 27, 2026
Merged via the queue into cometbft:main with commit 221f13b Jan 27, 2026
7 of 8 checks passed
@songgaoye songgaoye deleted the fix_prefixdb_flaw branch January 27, 2026 11:17
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.

2 participants