Skip to content

Commit c855134

Browse files
committed
Add skipFastLockRound option
1 parent 715430a commit c855134

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ This driver uses semantic versioning:
1414
- A change in the major version (e.g. 1.Y.Z -> 2.0.0) indicates _breaking_
1515
changes that require changes in your code to upgrade.
1616

17+
## [Unreleased]
18+
19+
### Added
20+
21+
- Added `skipFastLockRound` option for streaming transactions
22+
23+
This option was introduced in 3.12.1 and allows skipping the fast lock round.
24+
1725
## [9.0.0-preview.4] - 2024-06-18
1826

1927
### Added

src/database.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,13 @@ export type TransactionOptions = {
165165
* Determines the transaction size limit in bytes.
166166
*/
167167
maxTransactionSize?: number;
168+
/**
169+
* If set to `true`, the fast lock round will be skipped, which makes each
170+
* locking operation take longer but guarantees deterministic locking order
171+
* and may avoid deadlocks when many concurrent transactions are queued and
172+
* try to access the same collection with an exclusive lock.
173+
*/
174+
skipFastLockRound?: boolean;
168175
};
169176

170177
/**

0 commit comments

Comments
 (0)