mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
* filer.sync: retry an update whose destination lookup failed transiently FilerSink.UpdateEntry reported every lookup error as a missing entry, so the replicator and filer.sync deleted the destination key and created it again. For a directory, a canceled or unavailable lookup removed it with everything under it. Only a real not-found now lets the caller recreate the key; other lookup errors are returned for retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: leave a pointer to a recently minted version unrepaired When a versioned read finds a latest pointer whose version file is missing, the self-heal rescanned .versions and then either removed the directory (no version left) or rewrote the pointer to the newest version found. With filer.sync the directory and its pointer can arrive before the version file, so the heal acted on a version still in flight: the local directory removal replicated back and deleted the committed version on the source cluster, and a pointer repair would roll its latest pointer back. While the pointer names a version minted in the last ten minutes, the read now answers from the rescan without persisting anything, and the reconciler skips the key. After that window the heal works as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * filer.sync: retry a failed destination lookup before giving up on an update Returning a transient lookup error leaves the retry to the caller, and filer.replicate hands a failed event to the notification input instead of replaying it. Retry the lookup in place with the shared bounded backoff; a not-found still returns at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * filer.sync: count only the not-found sentinel as a missing destination LookupEntry already maps every miss to filer_pb.ErrNotFound, plain-text ones included. Matching the sentinel's text in any error also counted an Unavailable lookup carrying that text as a miss, which let the caller delete and recreate the key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: requeue an in-flight versions pointer for after the grace window The reconciler dropped a key whose pointer named a version still in flight, so nothing revisited it once the window passed. Requeue it for one grace window without counting the skip as an attempt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: probe the latest version file before deferring an in-flight pointer A recent pointer whose version file is already present needs no repair; deferring it kept the key queued for the whole grace window and used up queue capacity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: retry an in-flight versions pointer when its grace runs out The reconciler waited a full grace window after the deferral, so a pointer first seen near the end of its grace stayed unrepaired for almost twice as long. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: run the in-flight pointer grace from its local commit too The grace was measured from the version id's mint time on the origin cluster against the local clock, so a peer whose clock ran more than the grace ahead, or a filer.sync backlog longer than the grace, saw a just-synced pointer as stale and could remove or roll back the version. The .versions entry's commit time is stamped by the local filer when the pointer is stored, so it bounds the wait with the local clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: repair a pointerless .versions entry despite a recent commit The in-flight grace protects a pointer whose version file has not arrived yet. A .versions entry with no pointer names no such file, so a recent commit of it must not hold back the rebuild of its pointer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: hold a stale-pointer repair while the live entry is still in grace The heal checked the grace on the snapshot it took before the scan. A .versions entry stored again with the same pointer during the scan restarts the grace, so check it on the live entry the CAS is conditioned on before persisting the repair. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: recheck the live grace before removing an empty .versions The empty-directory cleanup checked the grace on the pre-scan snapshot, so a pointer stored again during the scan could still have its .versions removed. Re-read the entry and leave it while its grace lasts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>