@bastani/atomic-storage-libsql 0.9.89-alpha.2 → 0.9.89

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.89] - 2026-11-18
6
+
7
+ ### Fixed
8
+
9
+ - A write that follows an outage on a libSQL server (sqld) or Turso database no longer waits for the adapter's next timed resend of the close of a stream the outage cut while it held the write lock. The adapter sent such a close again only on its backoff timer, 250 ms and then twice as long each time, so an outage longer than a wait left the close for the next one, up to seconds after the server was back, while the next write waited on the server for the lock the stream still held. Now every request sends the kept closes ahead of itself. A write waits for them, so that on a server that answers them the close arrives first and frees the lock; a request made only of plain `SELECT` statements does not wait, and any other statement, including `WITH`, `PRAGMA` and `EXPLAIN` queries, is treated as a possible write and may share the same bounded wait. Writes wait at most 2 seconds in all for closes the server takes but does not answer, then go ahead and wait for those closes no more, though a close kept later is waited for again; a caller's abort ends the wait at once. A close the server refuses because the outage lost the answer to a request it had already run still frees nothing: the lock clears when the server expires the stream. The timer still sends the closes while the database sends nothing else, and only its own unanswered resends lengthen its wait, once each. Against sqld after a 300 ms outage, the next write committed 4–14 ms after the server was back instead of 455–466 ms ([#5114](https://github.com/bastani-inc/atomic/issues/5114)).
10
+ - Fixed a worker host crashing after a libSQL server rolled back a write batch. Batch execution now observes every statement, COMMIT and ROLLBACK result, so later timeout rejections cannot escape the reported storage failure. A batch whose COMMIT never ran is no longer reported as successful ([#4768](https://github.com/bastani-inc/atomic/issues/4768))
11
+ - Fixed `run`, `get` and `all` statements failing with `Storage unavailable` on `ws:` and `wss:` URLs. These statements now use WebSockets instead of attempting HTTP requests ([#4768](https://github.com/bastani-inc/atomic/issues/4768))
12
+ - On a libSQL server (sqld) shared by stores that create and drop their tables, such as several sessions, workflows or teams using one server, a statement no longer fails with `SQLITE_SCHEMA: database schema has changed` when other connections change the schema while the server prepares it. The server ran nothing of such a statement, so it is sent again, as a statement the server answers busy is, for up to 5 seconds. A write outside a transaction (`INSERT`, `UPDATE`, `DELETE`, `REPLACE`, or a `WITH` that writes), or a schema change (`CREATE`, `DROP`, `ALTER`) sent alone in one `exec`, also no longer fails with `SQLITE_SCHEMA` while other connections keep changing the schema for longer than the 5-second wait. Sent again as it was, such a write could meet a changed schema on every try, and on a loaded server only two or three tries fit in the wait. After the first `SQLITE_SCHEMA` answer, such a statement is now sent again inside a write transaction of its own, in one request, with a wait of its own. While the transaction holds the write lock no other connection can change the schema, so the statement runs, and it commits once or not at all. Reads (including `VALUES` and a `WITH` that only selects) and other statements, such as pragmas, are still sent again as they were. A statement inside a transaction, and several statements sent in one `exec`, are not sent again
13
+ - On a libSQL server (sqld) shared by stores that create and drop their tables, a read or write outside a transaction no longer fails now and then with `SQLITE_UNKNOWN: no such table` for a table that exists. sqld gives that answer, without running the statement, when it compiles the statement while other connections change the schema; it happened to a `DELETE` from a table whose rows a trigger also removes from a full-text index, on kept and new streams alike. When the server names a table the database's schema lists, the statement now runs again with growing waits, up to 20 times; a table that does not exist is still reported at once ([#5464](https://github.com/bastani-inc/atomic/issues/5464))
14
+
5
15
  ## [0.9.89-alpha.2] - 2026-11-18
6
16
 
7
17
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic-storage-libsql",
3
- "version": "0.9.89-alpha.2",
3
+ "version": "0.9.89",
4
4
  "description": "libSQL / Turso storage adapter for Atomic sessions, workflow journals, and Intercom.",
5
5
  "contributors": [
6
6
  "Norin Lavaee",