2023-02-08 17:28:38 +03:00
|
|
|
package objectconfig
|
|
|
|
|
2023-03-07 16:38:26 +03:00
|
|
|
import "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-node/config"
|
2023-02-08 17:28:38 +03:00
|
|
|
|
|
|
|
const (
|
|
|
|
deleteSubsection = "delete"
|
|
|
|
|
|
|
|
// DefaultTombstoneLifetime is the default value of tombstone lifetime in epochs.
|
|
|
|
DefaultTombstoneLifetime = 5
|
|
|
|
)
|
|
|
|
|
|
|
|
// TombstoneLifetime returns the value of `tombstone_lifetime` config parameter.
|
|
|
|
func TombstoneLifetime(c *config.Config) uint64 {
|
|
|
|
ts := config.UintSafe(c.Sub(subsection).Sub(deleteSubsection), "tombstone_lifetime")
|
|
|
|
if ts <= 0 {
|
|
|
|
return DefaultTombstoneLifetime
|
|
|
|
}
|
|
|
|
return ts
|
|
|
|
}
|