libervia-backend/libervia/backend/memory
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Goffi 2c5713b486 memory (disco): Fix pending queries isolation and cancellation:
When returning pending queries `Deferred`, a caller could add its own callbacks/errbacks
and modify the result. When another caller was reusing the `Deferred`, it got the modified
result (which could be `None`) instead of the expected `DiscoInfo`.

This has been fixed by creating and new `Deferred` on each request, and chaining it to the
original pending queries using the new `fork_deferred` helper method, so each caller get
its own isolated `Deferred`.

In `fork_deferred`, `cancel` method is used to call the parent Deferred `cancel`, to avoid
a wrong Exception propagation and the chained Deferred to be eventually called twice
(triggering `AlreadyCalledError`).

`cleanup_query` has been moved above `infos_cb` callback, as it should be the first
callback called.
2026-05-14 11:43:59 +02:00
..
migration memory (sqla_mapping): Add index on PrivateInd* tables: 2026-05-02 15:55:18 +02:00
__init__.py refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
cache.py Dates update. 2026-03-31 12:57:17 +02:00
crypto.py Dates update. 2026-03-31 12:57:17 +02:00
disco.py memory (disco): Fix pending queries isolation and cancellation: 2026-05-14 11:43:59 +02:00
encryption.py Dates update. 2026-03-31 12:57:17 +02:00
memory.py Formatting + type hints 2026-05-02 15:55:18 +02:00
params.py core (memory/param): Replace warning sign in ASCII by emoji: 2026-03-31 13:00:31 +02:00
persistent.py Dates update. 2026-03-31 12:57:17 +02:00
sqla.py memory: add WAL checkpoint and unload: 2026-05-02 15:55:18 +02:00
sqla_config.py Dates update. 2026-03-31 12:57:17 +02:00
sqla_mapping.py memory (sqla_mapping): Add index on PrivateInd* tables: 2026-05-02 15:55:18 +02:00