Browse Source

fix map update lock

pull/7481/head
chrislu 3 weeks ago
parent
commit
0c571f7334
  1. 4
      weed/s3api/s3api_bucket_config.go

4
weed/s3api/s3api_bucket_config.go

@ -290,8 +290,8 @@ func (bcc *BucketConfigCache) Clear() {
// IsNegativelyCached checks if a bucket is in the negative cache (doesn't exist)
func (bcc *BucketConfigCache) IsNegativelyCached(bucket string) bool {
bcc.mutex.RLock()
defer bcc.mutex.RUnlock()
bcc.mutex.Lock()
defer bcc.mutex.Unlock()
if cachedTime, exists := bcc.negativeCache[bucket]; exists {
// Check if the negative cache entry is still valid

Loading…
Cancel
Save