fix: overhead gc when DiskGCThreshold not set (#2750)
Signed-off-by: Jim Ma <majinjing3@gmail.com>
This commit is contained in:
parent
47e7880fc4
commit
9eb15b218d
|
|
@ -813,7 +813,8 @@ func (s *storageManager) TryGC() (bool, error) {
|
||||||
|
|
||||||
if quotaExceed || usageExceed {
|
if quotaExceed || usageExceed {
|
||||||
var bytesExceed int64
|
var bytesExceed int64
|
||||||
if quotaBytesExceed > usageBytesExceed {
|
// only use quotaBytesExceed when s.storeOption.DiskGCThreshold > 0
|
||||||
|
if s.storeOption.DiskGCThreshold > 0 && quotaBytesExceed > usageBytesExceed {
|
||||||
bytesExceed = quotaBytesExceed
|
bytesExceed = quotaBytesExceed
|
||||||
} else {
|
} else {
|
||||||
bytesExceed = usageBytesExceed
|
bytesExceed = usageBytesExceed
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue