@relaybus/mongodb 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/index.cjs +1730 -1306
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -5
- package/dist/index.d.ts +8 -5
- package/dist/index.js +1730 -1306
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -291,6 +291,13 @@ core does not renew the lease of a transactional handler while it runs (its comp
|
|
|
291
291
|
conflict with a renewal), so the lease must outlast the handler: keep transactional handlers
|
|
292
292
|
short, as the core documentation recommends.
|
|
293
293
|
|
|
294
|
+
### Transaction time budget
|
|
295
|
+
|
|
296
|
+
`bus.transaction` passes the bus `transactionTimeout` (default `'5s'`) to the store, which bounds the commit on the
|
|
297
|
+
server with `maxCommitTimeMS`. A transaction that ran past the budget is aborted before its commit, with all its writes,
|
|
298
|
+
and the caller gets a `TransactionTimeoutError`. The driver's `timeoutMS` is not set on the transaction, because it would
|
|
299
|
+
make operations that pass their own `timeoutMS` with the session throw. The store's own transactions are not affected.
|
|
300
|
+
|
|
294
301
|
## Indexes
|
|
295
302
|
|
|
296
303
|
Created idempotently by `setup()` (also run by `bus.start()` unless `setupStore: false`):
|
|
@@ -324,6 +331,8 @@ operator queries.
|
|
|
324
331
|
|
|
325
332
|
## Upgrading from 0.1.0
|
|
326
333
|
|
|
334
|
+
The step-by-step guide, including `completionHistory` and PgBouncer settings, is [Upgrading from 0.1 to 0.2](https://berkcansavur.github.io/relaybus/upgrading).
|
|
335
|
+
|
|
327
336
|
`setup()` upgrades a 0.1.0 database in place, idempotently, and is safe to run again: `processing`
|
|
328
337
|
deliveries become `pending` and due at once (their attempt stays counted, as a lost lease would count
|
|
329
338
|
it), the per-delivery lease fields are removed, every delivery gets its `laneId` and every event its
|