diff --git a/pkg/sql/sqlinstance/instancestorage/instancestorage.go b/pkg/sql/sqlinstance/instancestorage/instancestorage.go index 2f32a49d8901..c8fb19d0af82 100644 --- a/pkg/sql/sqlinstance/instancestorage/instancestorage.go +++ b/pkg/sql/sqlinstance/instancestorage/instancestorage.go @@ -100,7 +100,9 @@ func (s *Storage) CreateInstance( log.Warningf(ctx, "failed to encode row for instance id %d: %v", instanceID, err) return err } - return txn.Put(ctx, row.Key, row.Value) + b := txn.NewBatch() + b.Put(row.Key, row.Value) + return txn.CommitInBatch(ctx, b) }) if err != nil {