core/homeassistant/components/recorder
J. Nick Koston c2b770bcb9
Load pending state attributes and event data ids at startup (#88444)
* Load pending state attributes and event data ids at startup

Since we queue all events to be processed after startup
we can have a thundering herd of queries to prime the
LRUs of event data and state attributes ids. Since we
know we are about to process a chunk of events we can
fetch all the ids in two queries

* lru

* fix hang

* Fix recorder LRU being destroyed if event session is reopened

We would clear the LRU in _close_event_session but
it would never get replaced with an LRU again so
it would leak memory if the event session is reopened

* Fix recorder LRU being destroyed if event session is reopened

We would clear the LRU in _close_event_session but
it would never get replaced with an LRU again so
it would leak memory if the event session is reopened

* cleanup
2023-02-19 21:26:38 -05:00
..
system_health Upgrade SQLAlchemy to 2.0.2 (#86436) 2023-02-08 08:17:32 -06:00
__init__.py
backup.py
const.py Load pending state attributes and event data ids at startup (#88444) 2023-02-19 21:26:38 -05:00
core.py Load pending state attributes and event data ids at startup (#88444) 2023-02-19 21:26:38 -05:00
db_schema.py Load pending state attributes and event data ids at startup (#88444) 2023-02-19 21:26:38 -05:00
executor.py
filters.py Upgrade SQLAlchemy to 2.0.2 (#86436) 2023-02-08 08:17:32 -06:00
history.py Fix most recent states query not using the index for group by (#88461) 2023-02-19 21:05:45 -05:00
manifest.json Bump sqlalchemy to 2.0.3 (#87913) 2023-02-11 23:20:22 -05:00
migration.py Migrate statistics to use timestamp columns (#87321) 2023-02-09 12:24:19 -06:00
models.py Fix using MariaDB slow range select workaround with Postgresql (#88459) 2023-02-19 21:08:43 -05:00
pool.py Upgrade SQLAlchemy to 2.0.2 (#86436) 2023-02-08 08:17:32 -06:00
purge.py Load pending state attributes and event data ids at startup (#88444) 2023-02-19 21:26:38 -05:00
queries.py Load pending state attributes and event data ids at startup (#88444) 2023-02-19 21:26:38 -05:00
repack.py
run_history.py Ensure recorder still shuts down if the final commit fails (#87799) 2023-02-09 15:12:40 -06:00
services.py
services.yaml
statistics.py Load pending state attributes and event data ids at startup (#88444) 2023-02-19 21:26:38 -05:00
strings.json Add a repair issue when using MariaDB is affected by MDEV-25020 (#87040) 2023-01-31 20:42:07 +01:00
tasks.py Make the recorder LRU adjustment threadsafe (#88443) 2023-02-19 19:30:08 +01:00
util.py Load pending state attributes and event data ids at startup (#88444) 2023-02-19 21:26:38 -05:00
websocket_api.py The recorder/statistic(s)_during_period websocket API now require the statistic_id(s) field (#87937) 2023-02-12 14:51:10 -06:00