Skip to content

fix(Database): return bytes written#804

Merged
kurtisc merged 1 commit intomainfrom
kurtis/durable-storage/fix-bytes-written
Feb 10, 2026
Merged

fix(Database): return bytes written#804
kurtisc merged 1 commit intomainfrom
kurtis/durable-storage/fix-bytes-written

Conversation

@kurtisc
Copy link
Contributor

@kurtisc kurtisc commented Feb 10, 2026

Blocks RV-859

What

Fixes and adds a test for a bug introduced by #701. Found in #781

Why

The value returned was the index of the final byte, erroneously including the offset. It now only returns the length of what was copied.

Manually Testing

make all

Tasks for the Author

  • Link all Linear issues related to this MR using magic words (e.g. part of, relates to, closes).
  • Eliminate dead code and other spurious artefacts introduced in your changes.
  • Document new public functions, methods and types.
  • Make sure the documentation for updated functions, methods, and types is correct.
  • Add tests for bugs that have been fixed.
  • Explain changes to regression test captures when applicable.
  • Write commit messages in agreement with our guidelines.
  • Self-review your changes to ensure they are high-quality.
  • Complete all of the above before assigning this MR to reviewers.

Changes `Database::read` to return the bytes written not including the
offset.
@github-actions
Copy link

Benchmark results for revision cf5bc6e:

Metric Duration TPS
Mean 1.518213659s 26.348
Worst 1.551798354s 25.777
Best 1.503472357s 26.605
Standard Deviation ±9.729577ms ±0.167
Full results
Run Transfers Duration TPS
1 40 1.551798354s 25.777
2 40 1.525076305s 26.228
3 40 1.522627787s 26.270
4 40 1.52049963s 26.307
5 40 1.518572182s 26.341
6 40 1.513961544s 26.421
7 40 1.514890826s 26.405
8 40 1.520694102s 26.304
9 40 1.511418097s 26.465
10 40 1.51899623s 26.333
11 40 1.522575029s 26.271
12 40 1.521077753s 26.297
13 40 1.512866511s 26.440
14 40 1.503500768s 26.605
15 40 1.510007403s 26.490
16 40 1.521767844s 26.285
17 40 1.518145415s 26.348
18 40 1.512077494s 26.454
19 40 1.520247555s 26.312
20 40 1.503472357s 26.605

Compare the results above with those for the default branch.

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.07%. Comparing base (e882b7d) to head (b1b688d).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #804      +/-   ##
==========================================
- Coverage   91.07%   91.07%   -0.01%     
==========================================
  Files         110      110              
  Lines       20831    20831              
  Branches    20831    20831              
==========================================
- Hits        18972    18971       -1     
- Misses       1486     1487       +1     
  Partials      373      373              

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kurtisc kurtisc enabled auto-merge February 10, 2026 10:17
@kurtisc kurtisc added this pull request to the merge queue Feb 10, 2026
Merged via the queue into main with commit 0b244ed Feb 10, 2026
9 checks passed
@kurtisc kurtisc deleted the kurtis/durable-storage/fix-bytes-written branch February 10, 2026 11:13
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.

3 participants