Skip to main content
← Back to list
01Issue
BugClosedSwamp CLIPublic
AssigneesNone

Relationships

#2365 s3-datastore: every scoped push on a fresh datastore warns 'Index merge failed, fast path stays unarmed' (missing .datastore-index.json) and the fast path never arms

Opened by hammz · 9/22/2026

Summary

On a freshly set-up S3 datastore, every scoped push logs

[s3-sync] Index merge failed, fast path stays unarmed: NotFound: No such file or directory (os error 2): readfile '<cache>/.datastore-index.json'

and the commitSeq fast path never arms. .datastore-index.json is never created, so the next push takes the same path and warns again.

Where

datastore/s3/extensions/datastores/_lib/s3_cache_sync.ts, the index write-back after a commit (around the "Index merge failed, fast path stays unarmed" warning, added in 746b3bc3a / #294). When indexIsPartial is true (a scoped push assembled only the dirty shards), the code reads the on-disk index to merge into. On a fresh repo that file doesn't exist yet, so the read throws NotFound. The error is logged as a warning, and the function returns false.

Repro

  • swamp 20260922.185723.0-sha.33229b53, @swamp/s3-datastore from the swamp-club #2337 branch (the index code is unchanged there). Real Ceph RGW 19.2.5 in a local container, with a fresh bucket.
  • swamp init → swamp datastore setup extension @swamp/s3-datastore --config '{...endpoint, forcePathStyle...}' → swamp model create command/shell x → swamp model method run x execute --input run="echo hi", run 4 times.
  • Every run prints the warning. ls <repo cache>/.datastore-index.json → No such file, even after 4 successful pushes.

This was only observable once pushes succeeded on RGW (#2337). It's unrelated to that fix.

Expected

A missing on-disk index on a fresh datastore shouldn't be a warning every push, and the fast path should eventually arm. For example, treat NotFound as "no baseline yet" quietly, or make sure a full index gets written once.

Impact

Noise on every push, and pushes and pulls never take the commitSeq fast path on repos in this state (a performance cost, not a correctness one).

Upstream repository: https://github.com/systeminit/swamp-extensions

Environment

  • Extension: @swamp/s3-datastore@2026.09.22.2
  • swamp: 20260922.185723.0-sha.33229b53
  • OS: linux (x86_64)
  • Deno: 2.9.7
  • Shell: /usr/bin/zsh
02Bog Flow
✓OPEN○TRIAGED○IN PROGRESS◉CLOSED

Closed

9/22/2026, 9:24:00 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.