diff --git a/lib/mergeset/part.go b/lib/mergeset/part.go index a1033479a5..86bbc5bb8b 100644 --- a/lib/mergeset/part.go +++ b/lib/mergeset/part.go @@ -231,8 +231,8 @@ func (idxbc *indexBlockCache) cleanByTimeout() { currentTime := fasttime.UnixTimestamp() idxbc.mu.Lock() for k, idxbe := range idxbc.m { - // Delete items accessed more than 10 minutes ago. - if currentTime-atomic.LoadUint64(&idxbe.lastAccessTime) > 10*60 { + // Delete items accessed more than a minute ago. + if currentTime-atomic.LoadUint64(&idxbe.lastAccessTime) > 60 { delete(idxbc.m, k) } } @@ -378,8 +378,8 @@ func (ibc *inmemoryBlockCache) cleanByTimeout() { currentTime := fasttime.UnixTimestamp() ibc.mu.Lock() for k, ibe := range ibc.m { - // Delete items accessed more than 10 minutes ago. - if currentTime-atomic.LoadUint64(&ibe.lastAccessTime) > 10*60 { + // Delete items accessed more than a minute ago. + if currentTime-atomic.LoadUint64(&ibe.lastAccessTime) > 60 { delete(ibc.m, k) } } diff --git a/lib/storage/part.go b/lib/storage/part.go index 1c8fa54aec..2eb62b1803 100644 --- a/lib/storage/part.go +++ b/lib/storage/part.go @@ -232,8 +232,8 @@ func (ibc *indexBlockCache) cleanByTimeout() { currentTime := fasttime.UnixTimestamp() ibc.mu.Lock() for k, ibe := range ibc.m { - // Delete items accessed more than 10 minutes ago. - if currentTime-atomic.LoadUint64(&ibe.lastAccessTime) > 10*60 { + // Delete items accessed more than a minute ago. + if currentTime-atomic.LoadUint64(&ibe.lastAccessTime) > 60 { delete(ibc.m, k) } }