mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-06 12:07:51 +01:00
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:
1 parent
10b64686ba
commit
35e9f84334
2 files changed
+12
-9
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user