[#136] registry: Apply updates in batch
All checks were successful
DCO action / DCO (pull_request) Successful in 1m7s
Tests and linters / Tests (1.21) (pull_request) Successful in 2m27s
Tests and linters / Tests (1.20) (pull_request) Successful in 3m0s
Tests and linters / Tests with -race (pull_request) Successful in 3m19s
Tests and linters / Lint (pull_request) Successful in 4m33s
All checks were successful
DCO action / DCO (pull_request) Successful in 1m7s
Tests and linters / Tests (1.21) (pull_request) Successful in 2m27s
Tests and linters / Tests (1.20) (pull_request) Successful in 3m0s
Tests and linters / Tests with -race (pull_request) Successful in 3m19s
Tests and linters / Lint (pull_request) Successful in 4m33s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
7f139734b1
commit
e5af4112f9
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ func NewObjRegistry(ctx context.Context, dbFilePath string) *ObjRegistry {
|
|||
}
|
||||
|
||||
func (o *ObjRegistry) AddObject(cid, oid, s3Bucket, s3Key, payloadHash string) error {
|
||||
return o.boltDB.Update(func(tx *bbolt.Tx) error {
|
||||
return o.boltDB.Batch(func(tx *bbolt.Tx) error {
|
||||
b, err := tx.CreateBucketIfNotExists([]byte(statusCreated))
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue