fix short circuit if the compaction request from apiserver is disabled
Kubernetes-commit: 9fef30117f89830cc8b17610c359141b663844f1
This commit is contained in:
parent
8beb81657f
commit
e312f49d45
|
@ -378,6 +378,10 @@ func startCompactorOnce(c storagebackend.TransportConfig, interval time.Duration
|
|||
compactorsMu.Lock()
|
||||
defer compactorsMu.Unlock()
|
||||
|
||||
if interval == 0 {
|
||||
// short circuit, if the compaction request from apiserver is disabled
|
||||
return func() {}, nil
|
||||
}
|
||||
key := fmt.Sprintf("%v", c) // gives: {[server1 server2] keyFile certFile caFile}
|
||||
if compactor, foundBefore := compactors[key]; !foundBefore || compactor.interval > interval {
|
||||
compactorClient, err := newETCD3Client(c)
|
||||
|
|
Loading…
Reference in New Issue