From abe03ccbd3977bc9054298720b171ee670ecfa3c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 13 Nov 2026 01:46:13 -0800 Subject: [PATCH] mount: skip a link change no newer than the handle's entry A link change carried into the handle could replace a base already moved past it by a later acknowledgment. Use the same clock-domain check as installAckedEntry. Co-Authored-By: Claude Opus 5.5 --- weed/mount/weedfs_link.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weed/mount/weedfs_link.go b/weed/mount/weedfs_link.go index 0b6bf705bb..28c0ab3a77 100644 --- a/weed/mount/weedfs_link.go +++ b/weed/mount/weedfs_link.go @@ -241,6 +241,11 @@ func (fh *FileHandle) adoptLinkChangeLocked(stored *filer_pb.Entry, versionTsNs if stored == nil { return } + handleSignature := fh.entryVersionSignature.Load() + provablyOtherClock := signature != 0 && handleSignature != 0 && signature != handleSignature + if versionTsNs != 0 && !provablyOtherClock && versionTsNs <= fh.entryVersionTsNs.Load() { + return + } if base := fh.baseEntry.Load(); base != nil && !fh.wfs.sameApartFromLink(stored, base) { return }