diff --git a/internal/registry/obj_registry.go b/internal/registry/obj_registry.go index b1ed3dd..2671401 100644 --- a/internal/registry/obj_registry.go +++ b/internal/registry/obj_registry.go @@ -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