-
Notifications
You must be signed in to change notification settings - Fork 0
docs: reflect Signal-store read routing from whatsapp-rust#1222 #484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -965,6 +965,10 @@ let backend = Arc::new( | |
| `SqliteStore::new` and `SqliteStore::new_for_device` are unchanged — they delegate to `SqliteStoreConfig::default()` internally. Raising `pool_size` above `1` makes *writes* concurrent, which SQLite does not want — two deferred transactions that both read and then write deadlock on the upgrade, and `busy_timeout` cannot break it. `read_pool_size` (set via the `with_read_pool_size` builder, or the struct field directly) is the knob for concurrency instead: it reserves connections purely for reads, which WAL lets run alongside a pending write without contending for the write lock. Left at `0`, reads queue on the same permit as writes exactly as before this knob existed. | ||
| </Note> | ||
|
|
||
| <Note> | ||
| As of [whatsapp-rust#1222](https://github.com/oxidezap/whatsapp-rust/pull/1222), `read_pool_size` also covers most of `SqliteStore`'s own `SignalStore`/`AppSyncStore`/`ProtocolStore`/`DeviceStore` reads, not just [`whatsapp-rust-chat-store`](/api/chat-store)'s queries. Session, identity, sender-key, and pre-key lookups on the decrypt path — `get_session`, `load_identity`, `get_sender_key`, `load_prekey`, and similar — now run on the reader pool instead of queueing behind `pool_size`'s single write permit, raising the ceiling on read concurrency during a write-behind flush. A handful of reads stay on the write queue by design because a stale answer would go out on the wire, fail an operation outright, or get promoted into a cache unconditionally — app-state sync key lookups, `messageSecret` reads, and `get_devices` among them. Widening `read_pool_size` past `0` now buys concurrency for the whole read surface, not just chat/message queries. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Rewrite this note as several short, reader-focused sentences: it currently combines coverage, examples, performance effects, exceptions, and a summary in one very long sentence, while AGENTS.md reference: AGENTS.md:L24-L25 Useful? React with 👍 / 👎. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Replace “the whole read surface” with “most of the read surface” or similarly qualified wording. The same sentence explicitly states that app-state sync key, Useful? React with 👍 / 👎. |
||
| </Note> | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| **Multi-session measurements (from PR #926):** | ||
|
|
||
| | | before | after (default config) | | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.