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:
@@ -105,6 +105,16 @@ idle ones each pool keeps; more are closed as they're put back, and an
|
||||
idle one is closed after a minute unused (looked at every 10 s). 0 opens
|
||||
one per request.
|
||||
|
||||
## Query time limit
|
||||
|
||||
`[server] query_time_limit` (20 s by default) is how long a client's
|
||||
query may run. Past it, SQLite stops it (it looks every 10,000 steps, a
|
||||
fraction of a millisecond) and the client is refused with `QueryTimedOut` (11):
|
||||
"stopped after 20s, the server's time limit". Keep it under the clients'
|
||||
answer timeout (30 s by default; `BakaShrot_SetAnswerTimeout()`), or they
|
||||
give up first. A client that gives up closes its connection, and the
|
||||
server stops its query then too (`protocol.md`, "Rules").
|
||||
|
||||
## Retention
|
||||
|
||||
A topic takes its name's line, else the first pattern matching it in the
|
||||
|
||||
Reference in New Issue
Block a user