Skip to content

Commit

Permalink
Merge pull request #1261 from ydb-platform/default-tx-control
Browse files Browse the repository at this point in the history
* Changed `query.DefaultTxControl()` from `quury.SerializableReadWrite()` with commit to `query.NoTx()`
  • Loading branch information
asmyasnikov authored Jun 6, 2024
2 parents 14c70e8 + 298bcd5 commit 2429406
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Changed `query.DefaultTxControl()` from `query.SerializableReadWrite()` with commit to `query.NoTx()`

## v3.73.0
* Added experimental `retry.DoWithResult` and `retry.DoTxWithResult` helpers for retry lambda and return value from lambda

Expand Down
7 changes: 2 additions & 5 deletions query/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,9 @@ func NoTx() *TransactionControl {
return nil
}

// DefaultTxControl returns default transaction control with serializable read-write isolation mode and auto-commit
// DefaultTxControl returns default transaction control for use default tx control on server-side
func DefaultTxControl() *TransactionControl {
return TxControl(
BeginTx(WithSerializableReadWrite()),
CommitTx(),
)
return NoTx()
}

// SerializableReadWriteTxControl returns transaction control with serializable read-write isolation mode
Expand Down

0 comments on commit 2429406

Please sign in to comment.