diff options
| author | chrislu <chris.lu@gmail.com> | 2022-09-04 22:23:31 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-09-04 22:23:31 -0700 |
| commit | f4abefc1091efb841cfce05b44f9aef576e79e94 (patch) | |
| tree | 947db17de75b3a86138f5438c19185fb9077bec8 | |
| parent | 39340f7e42ea3a2b68c60fe2e18dfb68638075aa (diff) | |
| parent | bf844d8e4623932cbe48d1b461894ade8a65b610 (diff) | |
| download | seaweedfs-f4abefc1091efb841cfce05b44f9aef576e79e94.tar.xz seaweedfs-f4abefc1091efb841cfce05b44f9aef576e79e94.zip | |
Merge branch 'master' of https://github.com/seaweedfs/seaweedfs
| -rw-r--r-- | weed/filer/arangodb/arangodb_store.go | 2 | ||||
| -rw-r--r-- | weed/filer/arangodb/arangodb_store_bucket.go | 3 | ||||
| -rw-r--r-- | weed/filer/arangodb/helpers.go | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/weed/filer/arangodb/arangodb_store.go b/weed/filer/arangodb/arangodb_store.go index 75e65f7e0..25ef60bf0 100644 --- a/weed/filer/arangodb/arangodb_store.go +++ b/weed/filer/arangodb/arangodb_store.go @@ -121,7 +121,7 @@ func (store *ArangodbStore) BeginTransaction(ctx context.Context) (context.Conte return nil, err } - return context.WithValue(ctx, transactionKey, txn), nil + return context.WithValue(driver.WithTransactionID(ctx, txn), transactionKey, txn), nil } func (store *ArangodbStore) CommitTransaction(ctx context.Context) error { 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() |
