diff --git a/lib/mergeset/part.go b/lib/mergeset/part.go index 2fb5607e67..e8b78543eb 100644 --- a/lib/mergeset/part.go +++ b/lib/mergeset/part.go @@ -205,9 +205,9 @@ func (idxbc *indexBlockCache) cleanByTimeout() { currentTime := fasttime.UnixTimestamp() idxbc.mu.Lock() for k, idxbe := range idxbc.m { - // Delete items accessed more than a minute ago. + // Delete items accessed more than two minutes ago. // This time should be enough for repeated queries. - if currentTime-atomic.LoadUint64(&idxbe.lastAccessTime) > 60 { + if currentTime-atomic.LoadUint64(&idxbe.lastAccessTime) > 2*60 { delete(idxbc.m, k) } } @@ -350,9 +350,9 @@ func (ibc *inmemoryBlockCache) cleanByTimeout() { currentTime := fasttime.UnixTimestamp() ibc.mu.Lock() for k, ibe := range ibc.m { - // Delete items accessed more than a minute ago. + // Delete items accessed more than two minutes ago. // This time should be enough for repeated queries. - if currentTime-atomic.LoadUint64(&ibe.lastAccessTime) > 60 { + if currentTime-atomic.LoadUint64(&ibe.lastAccessTime) > 2*60 { delete(ibc.m, k) } } diff --git a/lib/storage/part.go b/lib/storage/part.go index f5949f1ed0..9638df7581 100644 --- a/lib/storage/part.go +++ b/lib/storage/part.go @@ -204,9 +204,9 @@ func (ibc *indexBlockCache) cleanByTimeout() { currentTime := fasttime.UnixTimestamp() ibc.mu.Lock() for k, ibe := range ibc.m { - // Delete items accessed more than a minute ago. + // Delete items accessed more than two minutes ago. // This time should be enough for repeated queries. - if currentTime-atomic.LoadUint64(&ibe.lastAccessTime) > 60 { + if currentTime-atomic.LoadUint64(&ibe.lastAccessTime) > 2*60 { delete(ibc.m, k) } }