filer: preserve existing TTL during CreateEntry/UpdateEntry gRPC calls
This ensures that metadata load correctly restores entries with their original TTL instead of overwriting with the default from filer.conf. Fixes #8159.
This commit is contained in:
@@ -155,7 +155,9 @@ func (fs *FilerServer) CreateEntry(ctx context.Context, req *filer_pb.CreateEntr
|
|||||||
newEntry.Chunks = chunks
|
newEntry.Chunks = chunks
|
||||||
// Don't apply TTL to remote entries - they're managed by remote storage
|
// Don't apply TTL to remote entries - they're managed by remote storage
|
||||||
if newEntry.Remote == nil {
|
if newEntry.Remote == nil {
|
||||||
newEntry.TtlSec = so.TtlSeconds
|
if newEntry.TtlSec == 0 {
|
||||||
|
newEntry.TtlSec = so.TtlSeconds
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
newEntry.TtlSec = 0
|
newEntry.TtlSec = 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user