Skip to content

Commit e59b43b

Browse files
authored
Merge pull request #1467 from sshaplygin/skip-rollback
add: skip rollback
2 parents ef5ba1d + 4ad4415 commit e59b43b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Doesn't rollback a the transaction on the operation error in table service
2+
13
## v3.80.6
24
* Fixed concurrent map writes in metrics
35
* Renamed method at experimental API reader.PopBatchTx to reader.PopMessagesBatchTx

internal/table/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (c *Client) DoTx(ctx context.Context, op table.TxOperation, opts ...table.O
238238
}
239239

240240
defer func() {
241-
if err != nil {
241+
if err != nil && !xerrors.IsOperationError(err) {
242242
_ = tx.Rollback(ctx)
243243
}
244244
}()

0 commit comments

Comments
 (0)