etcdserver/api/v3compactor/periodic.go
func (pc *Periodic) getCompactInterval() time.Duration {
	itv := pc.period
	if itv > time.Hour {
		itv = time.Hour
	}
	return itv
}
func (pc *Periodic) getCompactInterval() time.Duration {
	itv := pc.period
	if itv > time.Hour {
		itv = time.Hour
	}
	return itv
}
func ( pc * Periodic ) getCompactInterval ( ) time . Duration { itv := pc . period if itv > time . Hour { itv = time . Hour } return itv }
// if given compaction period x is <1-hour, compact every x duration.
// (e.g. --auto-compaction-mode 'periodic' --auto-compaction-retention='10m', then compact every 10-minute)
// if given compaction period x is >1-hour, compact every hour.
// (e.g. --auto-compaction-mode 'periodic' --auto-compaction-retention='2h', then compact every 1-hour)
if given compaction period x is <1 - hour compact every x duration . ( e . g . -- auto - compaction - mode periodic -- auto - compaction - retention = 10m then compact every 10 - minute ) if given compaction period x is > 1 - hour compact every hour . ( e . g . -- auto - compaction - mode periodic -- auto - compaction - retention = 2h then compact every 1 - hour )