mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Merge branch 'master' of https://github.com/seaweedfs/seaweedfs
This commit is contained in:
commit
f4abefc109
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue