mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
Stopped long queries, Read is_open() through TLS, Simplified answers and paging
- [server] query_time_limit (20 s by default) stops a client's query through SQLite's progress handler: refused with QueryTimedOut (11). A client closing while its query runs stops it too. - The answer timeout in the DLL (BakaShrot_SetAnswerTimeout / GetAnswerTimeout, kept across connections), Python (answer_timeout) and C# (AnswerTimeoutMs); QueryTimedOut in every binding. - is_open() reads what's waiting through TLS: a close_notify says closed, TLS's own records keep it open, unasked data or a broken stream close it. - The Rust client checks an answer's type in one place (TryFrom per packet); Client::wait() pings while waiting (the tool's --follow). - Pair::from(&Head), heads_after taking a Pair; simpler SyncState paging on both ends; the writer's redundant rollback check dropped. - codes.rs: the bindings' error codes and copied values match Rust's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-3
@@ -74,7 +74,7 @@ batch goes on after one fails: the server queues pushes and stores them
|
||||
together, one disk flush for all.
|
||||
|
||||
Except when SQLite rolls the whole transaction back by itself, which it
|
||||
may on a full disk, an I/O error or out of memory (`Batch::is_rolled_back()`).
|
||||
may on a full disk, an I/O error or out of memory.
|
||||
What came after then ran outside any transaction, each operation
|
||||
committed alone, while the batch failed and every write in it was
|
||||
answered as failed: a retried push stored twice. Since 2026-11-19 every
|
||||
@@ -271,7 +271,5 @@ big), the view's plans, and readers with two writers at once. In
|
||||
- **A time index**, if time queries over big streams get slow: a v10
|
||||
migration adding an index on `(stream_id, pushed_at)` and joining the
|
||||
view on it too (measured above: twice the write cost).
|
||||
- **Interrupting long queries** (a time limit): the server's, with
|
||||
SQLite's interrupt.
|
||||
- **Attachments as files** next to the database instead of in it, if their
|
||||
size calls for it.
|
||||
|
||||
Reference in New Issue
Block a user