@loradb/lora-node 0.30.0 → 0.31.0
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 +17 -3
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -236,6 +236,11 @@ Resuming:
|
|
|
236
236
|
covers, so history starts at the last `sync()`.
|
|
237
237
|
- An LSN the database no longer retains fails with
|
|
238
238
|
`LORA_CHANGES_TRUNCATED`: start a new feed and re-read current state.
|
|
239
|
+
- On a WAL-backed database a batch is delivered once its commit is durable
|
|
240
|
+
(fsynced), so a crash can never take back an LSN a consumer has seen. The
|
|
241
|
+
feed asks for the fsync at once; under a steady stream of writes batches
|
|
242
|
+
trail the commit by up to the WAL sync interval (50 ms by default, 1 s
|
|
243
|
+
for a named database).
|
|
239
244
|
|
|
240
245
|
Writers never wait for a feed. Each feed buffers up to `bufferSize` batches
|
|
241
246
|
(default 1024); a consumer that falls further behind receives the buffered
|
|
@@ -509,9 +514,18 @@ See `ts/types.ts` (`LoraErrorCode`) for the full list.
|
|
|
509
514
|
deadlocking: the writer holding the lock always runs). Prefer
|
|
510
515
|
`await`-in-a-loop or a single batched query for heavy write workloads.
|
|
511
516
|
While an interactive transaction or a mutating stream is open (it holds
|
|
512
|
-
the lock until JavaScript finishes it),
|
|
513
|
-
|
|
514
|
-
|
|
517
|
+
the lock until JavaScript finishes it), writes wait off the pool instead,
|
|
518
|
+
so it stays free for `fs`, `dns`, `zlib` and `crypto`. Auto-commit
|
|
519
|
+
`execute()` and `profile()` writes then wait in a first-in, first-out
|
|
520
|
+
queue per database handle, run by one thread: 2 000 writes behind a long
|
|
521
|
+
transaction take one thread, not 2 000. A queued write still rejects with
|
|
522
|
+
`LORA_TIMEOUT` when its `timeoutMs` (or `queryTimeoutMs`) passes or its
|
|
523
|
+
`signal` aborts, and the time it spends queued counts against the
|
|
524
|
+
timeout. `dispose()` rejects the writes still queued. `clear()`,
|
|
525
|
+
`sync()`, `loadSnapshot()` and reads never wait behind that queue:
|
|
526
|
+
`sync()` on an in-memory or WAL database finishes while writes are
|
|
527
|
+
queued (on a database opened by name it takes the writer lock, so it
|
|
528
|
+
waits for the transaction like a write).
|
|
515
529
|
Interactive transactions wait on their own threads, not the pool, and so
|
|
516
530
|
do mutating `stream()`s while the lock may be busy: one opens without
|
|
517
531
|
blocking the event loop, and its first `next()` waits for the writer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loradb/lora-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Node.js / TypeScript bindings for the Lora in-memory graph database",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"packageManager": "yarn@4.5.1",
|
|
@@ -96,12 +96,12 @@
|
|
|
96
96
|
"vitest": "^2.1.1"
|
|
97
97
|
},
|
|
98
98
|
"optionalDependencies": {
|
|
99
|
-
"@loradb/lora-node-linux-x64-gnu": "0.
|
|
100
|
-
"@loradb/lora-node-linux-arm64-gnu": "0.
|
|
101
|
-
"@loradb/lora-node-linux-x64-musl": "0.
|
|
102
|
-
"@loradb/lora-node-linux-arm64-musl": "0.
|
|
103
|
-
"@loradb/lora-node-darwin-x64": "0.
|
|
104
|
-
"@loradb/lora-node-darwin-arm64": "0.
|
|
105
|
-
"@loradb/lora-node-win32-x64-msvc": "0.
|
|
99
|
+
"@loradb/lora-node-linux-x64-gnu": "0.31.0",
|
|
100
|
+
"@loradb/lora-node-linux-arm64-gnu": "0.31.0",
|
|
101
|
+
"@loradb/lora-node-linux-x64-musl": "0.31.0",
|
|
102
|
+
"@loradb/lora-node-linux-arm64-musl": "0.31.0",
|
|
103
|
+
"@loradb/lora-node-darwin-x64": "0.31.0",
|
|
104
|
+
"@loradb/lora-node-darwin-arm64": "0.31.0",
|
|
105
|
+
"@loradb/lora-node-win32-x64-msvc": "0.31.0"
|
|
106
106
|
}
|
|
107
107
|
}
|