Skip to content

[runtime/utils/buffer/append] use Blob::write_at_sync#3857

Merged
patrick-ogrady merged 15 commits into
mainfrom
andre/runtime-append-write-at-sync
May 22, 2026
Merged

[runtime/utils/buffer/append] use Blob::write_at_sync#3857
patrick-ogrady merged 15 commits into
mainfrom
andre/runtime-append-write-at-sync

Conversation

@andresilva
Copy link
Copy Markdown
Member

@andresilva andresilva commented May 22, 2026

This PR updates buffer::paged::Append to use Blob::write_at_sync when a flush can be persisted with a single physical write. When a flush is split around a protected CRC slot, or when a prior plain write or resize still needs a durability barrier, it falls back to plain writes followed by a single full sync. It now tracks whether prior blob mutations still need a full sync so sync() can skip work when there is nothing pending. Resize/shrink handling was adjusted so real physical resizes are made durable correctly, while logical-only partial shrinks can keep using range sync for their CRC updates.

Depends on #3852.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 22, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
commonware-mcp 837ad2f May 22 2026, 08:23 PM

@andresilva andresilva moved this to Ready for Review in Tracker May 22, 2026
@andresilva andresilva self-assigned this May 22, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 22, 2026

Benchmark results

Tip

PASSED: No benchmark exceeded the regression threshold.

Benchmark comparison table
Benchmark Baseline (main) Current Delta Threshold Status
qmdb::merkleize/variant=any::unordered::fixed::mmr keys=10000 ch=false sync=false 1.577 ms 1.624 ms +3.00% 10.00% ✅ PASS
qmdb::merkleize/variant=current::ordered::fixed::mmb chunk=256 keys=10000 ch=true sync=false 3.059 ms 3.218 ms +5.18% 10.00% ✅ PASS

Baseline commit(s): c1cd5a32740d

@andresilva andresilva force-pushed the andre/runtime-append-write-at-sync branch from 3ad003c to dd24c7f Compare May 22, 2026 11:02
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 22, 2026

Deploying monorepo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 837ad2f
Status: ✅  Deploy successful!
Preview URL: https://465dc6ba.monorepo-eu0.pages.dev
Branch Preview URL: https://andre-runtime-append-write-a.monorepo-eu0.pages.dev

View logs

… pr/3857

# Conflicts:
#	runtime/src/utils/buffer/mod.rs
#	runtime/src/utils/buffer/write.rs
@patrick-ogrady
Copy link
Copy Markdown
Contributor

bugbot run

@patrick-ogrady patrick-ogrady marked this pull request as ready for review May 22, 2026 20:23
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 837ad2f. Configure here.

@patrick-ogrady patrick-ogrady merged commit 2ac1695 into main May 22, 2026
176 of 177 checks passed
@patrick-ogrady patrick-ogrady deleted the andre/runtime-append-write-at-sync branch May 22, 2026 20:39
@github-project-automation github-project-automation Bot moved this from Ready for Review to Done in Tracker May 22, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 95.89041% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.77%. Comparing base (3c08216) to head (837ad2f).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
runtime/src/utils/buffer/paged/append.rs 95.45% 11 Missing and 7 partials ⚠️
@@            Coverage Diff             @@
##             main    #3857      +/-   ##
==========================================
+ Coverage   95.75%   95.77%   +0.02%     
==========================================
  Files         486      486              
  Lines      200864   201251     +387     
  Branches     4861     4876      +15     
==========================================
+ Hits       192341   192756     +415     
+ Misses       6891     6860      -31     
- Partials     1632     1635       +3     
Files with missing lines Coverage Δ
runtime/src/utils/buffer/mod.rs 97.30% <100.00%> (+1.95%) ⬆️
storage/src/journal/segmented/variable.rs 93.94% <100.00%> (+0.01%) ⬆️
runtime/src/utils/buffer/paged/append.rs 97.71% <95.45%> (+0.85%) ⬆️

... and 8 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1cd5a3...837ad2f. Read the comment docs.

🚀 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants