diff --git a/weed/filer/arangodb/arangodb_store_bucket.go b/weed/filer/arangodb/arangodb_store_bucket.go index b35a5c9b3..44aeeadea 100644 --- a/weed/filer/arangodb/arangodb_store_bucket.go +++ b/weed/filer/arangodb/arangodb_store_bucket.go @@ -34,6 +34,9 @@ func (store *ArangodbStore) OnBucketDeletion(bucket string) { glog.Errorf("bucket delete %s: %v", bucket, err) return } + store.mu.Lock() + delete(store.buckets, bucket) + store.mu.Unlock() } func (store *ArangodbStore) CanDropWholeBucket() bool { return true diff --git a/weed/filer/arangodb/helpers.go b/weed/filer/arangodb/helpers.go index 35796a8f8..3f36acb0a 100644 --- a/weed/filer/arangodb/helpers.go +++ b/weed/filer/arangodb/helpers.go @@ -86,7 +86,7 @@ func (store *ArangodbStore) ensureBucket(ctx context.Context, bucket string) (bc store.mu.RLock() bc, ok = store.buckets[bucket] store.mu.RUnlock() - if ok { + if ok && bc != nil { return bc, nil } store.mu.Lock()