Skip to content

Makes cache writes atomic#272

Merged
arcanis merged 1 commit intomainfrom
mael/atomic-cache-writes
Apr 1, 2026
Merged

Makes cache writes atomic#272
arcanis merged 1 commit intomainfrom
mael/atomic-cache-writes

Conversation

@arcanis
Copy link
Copy Markdown
Member

@arcanis arcanis commented Apr 1, 2026

Investigating why we sometimes have Invalid zip errors and inconsistent fetch data:

➤ │ Resolved 1716 packages, fetched 1294 packages (367.86 MiB)
➤ │ Resolved 1716 packages, fetched 1295 packages (368.03 MiB)

I noticed the cache writes aren't atomic, which could be related.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

⏱️ Benchmark Results

gatsby install-full-cold

Metric Base Head Difference
Mean 2.304s 2.299s -0.21% ✅
Median 2.292s 2.305s +0.55% ⚠️
Min 2.215s 2.162s
Max 2.489s 2.400s
Std Dev 0.066s 0.057s
📊 Raw benchmark data (gatsby install-full-cold)

Base times: 2.460s, 2.489s, 2.237s, 2.228s, 2.301s, 2.306s, 2.356s, 2.259s, 2.265s, 2.377s, 2.380s, 2.306s, 2.300s, 2.215s, 2.274s, 2.354s, 2.296s, 2.304s, 2.324s, 2.288s, 2.228s, 2.260s, 2.233s, 2.272s, 2.326s, 2.238s, 2.288s, 2.385s, 2.274s, 2.286s

Head times: 2.296s, 2.162s, 2.304s, 2.333s, 2.309s, 2.296s, 2.341s, 2.244s, 2.310s, 2.235s, 2.195s, 2.278s, 2.359s, 2.385s, 2.397s, 2.215s, 2.400s, 2.310s, 2.325s, 2.367s, 2.306s, 2.300s, 2.308s, 2.277s, 2.348s, 2.257s, 2.266s, 2.238s, 2.335s, 2.269s


gatsby install-cache-and-lock (warm, with lockfile)

Metric Base Head Difference
Mean 0.351s 0.362s +3.30% ⚠️
Median 0.351s 0.353s +0.71% ⚠️
Min 0.344s 0.350s
Max 0.362s 0.593s
Std Dev 0.004s 0.044s
📊 Raw benchmark data (gatsby install-cache-and-lock (warm, with lockfile))

Base times: 0.344s, 0.347s, 0.345s, 0.347s, 0.348s, 0.346s, 0.345s, 0.346s, 0.347s, 0.350s, 0.349s, 0.350s, 0.348s, 0.353s, 0.351s, 0.352s, 0.351s, 0.355s, 0.354s, 0.352s, 0.349s, 0.354s, 0.354s, 0.355s, 0.362s, 0.358s, 0.353s, 0.355s, 0.352s, 0.354s

Head times: 0.351s, 0.354s, 0.357s, 0.359s, 0.354s, 0.353s, 0.355s, 0.354s, 0.593s, 0.351s, 0.350s, 0.356s, 0.352s, 0.352s, 0.351s, 0.353s, 0.352s, 0.356s, 0.354s, 0.357s, 0.355s, 0.350s, 0.350s, 0.354s, 0.350s, 0.355s, 0.353s, 0.353s, 0.353s, 0.384s

@arcanis arcanis merged commit 4033a69 into main Apr 1, 2026
16 of 17 checks passed
@arcanis arcanis deleted the mael/atomic-cache-writes branch April 1, 2026 14:06
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