Browse Source

Merge pull request #4152 from xiang90/fix_force

backend: create bucket should increase pending
Xiang Li 10 years ago
parent
commit
b546f4c2c2
1 changed files with 1 additions and 0 deletions
  1. 1 0
      storage/backend/batch_tx.go

+ 1 - 0
storage/backend/batch_tx.go

@@ -52,6 +52,7 @@ func (t *batchTx) UnsafeCreateBucket(name []byte) {
 	if err != nil && err != bolt.ErrBucketExists {
 		log.Fatalf("storage: cannot create bucket %s (%v)", string(name), err)
 	}
+	t.pending++
 }
 
 // before calling unsafePut, the caller MUST hold the lock on tx.