filer.remote.sync: an unread offset never resolves to the mount's creation time

With the offset read now bounded, a timed-out read fell through to the
directory's creation time and replayed every event already synced. The
error goes back to the startup retry loop, as with -timeAgo; a missing
offset still reads as zero without an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chris LuandClaude Opus 5.5 committed 2026-11-06 01:07:52 -08:00
1 parent c7338fb68f
commit 0a1b6c2944
2 files changed
+10 -1

No files matched your search

+4 -1
View File
@@ -1120,8 +1120,11 @@ func resolveLastSyncOffset(mountedDir string, timeAgo time.Duration, lookupMount
}
lastOffsetTsNs, err := readOffset()
if err != nil {
return time.Time{}, fmt.Errorf("read the sync offset of %s: %w", mountedDir, err)
}
if mountedDirEntry != nil {
if err == nil && mountedDirEntry.Attributes.Crtime < lastOffsetTsNs/1000000 {
if mountedDirEntry.Attributes.Crtime < lastOffsetTsNs/1000000 {
lastOffsetTs = time.Unix(0, lastOffsetTsNs)
glog.V(0).Infof("resume from %v", lastOffsetTs)
} else {