filer: an unrepresentable remaining TTL means no volume TTL

The fallback capped the remainder at MaxInt32 seconds, which the volume
TTL grid encodes as 68 years - about 35 days shorter than the entry's
lifetime. For the narrow band nothing can round up within int32, store
the chunks without a volume TTL instead: they outlive the entry rather
than predecease it.
This commit is contained in:
Chris Lu committed 2026-08-10 18:42:18 -07:00
1 parent 10b64686ba
commit 35e9f84334
2 files changed
+12 -9

No files matched your search

+3 -1
View File
@@ -65,7 +65,9 @@ func roundUpToVolumeTTL(seconds int64) int32 {
return int32(count * unit)
}
}
return math.MaxInt32
// Nothing above ~68 years rounds up within int32; no volume TTL keeps the
// chunks past the entry, which is the safe direction.
return 0
}
// formatChunkSizeLimit mirrors the autoChunk maxMB resolution.