Commit only once

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-01-27 12:59:07 -08:00
parent 752be27815
commit 5532093d58
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -588,12 +588,6 @@ create temp table b (like blocks excluding constraints) on commit drop;
return xerrors.Errorf("blk put: %w", err)
}
err = tx.Commit()
if err != nil {
return xerrors.Errorf("commit: %w", err)
}
stmt3, err := tx.Prepare(`copy c(block, index, sector_id, parital) from stdin`)
if err != nil {
return xerrors.Errorf("s3 create: %w")
@ -620,7 +614,6 @@ create temp table b (like blocks excluding constraints) on commit drop;
}
err = tx.Commit()
if err != nil {
return xerrors.Errorf("commit: %w", err)
}