core/tests/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
..
__init__.py Use python defaults for comparing State, LazyState, and Event objects (#86856) 2023-01-29 13:31:43 -05:00
common.py Use python defaults for comparing State, LazyState, and Event objects (#86856) 2023-01-29 13:31:43 -05:00
db_schema_0.py
db_schema_16.py
db_schema_18.py
db_schema_22.py
db_schema_23.py
db_schema_23_with_newer_columns.py Improve performance of fetching and storing history and events with the database (#84870) 2023-01-02 13:26:08 -10:00
db_schema_25.py Upgrade SQLAlchemy to 2.0.2 (#86436) 2023-02-08 08:17:32 -06:00
db_schema_28.py Upgrade SQLAlchemy to 2.0.2 (#86436) 2023-02-08 08:17:32 -06:00
db_schema_30.py Make recorder platform attribute exclude integration aware (#88357) 2023-02-18 10:08:59 +01:00
test_backup.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
test_filters.py Add return type to tests without arguments (#87613) 2023-02-07 14:20:06 +01:00
test_filters_with_entityfilter.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
test_history.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
test_history_db_schema_30.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
test_init.py Make the recorder LRU adjustment threadsafe (#88443) 2023-02-19 19:30:08 +01:00
test_migrate.py Load pending state attributes and event data ids at startup (#88444) 2023-02-19 21:26:38 -05:00
test_models.py Use entity_sources to determine integration in recorder platforms (#88382) 2023-02-18 07:21:41 -06:00
test_pool.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
test_purge.py Load pending state attributes and event data ids at startup (#88444) 2023-02-19 21:26:38 -05:00
test_run_history.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
test_statistics.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
test_statistics_v23_migration.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
test_system_health.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
test_util.py Fix using MariaDB slow range select workaround with Postgresql (#88459) 2023-02-19 21:08:43 -05:00
test_v32_migration.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00
test_websocket_api.py Add type hints to integration tests (recorder) (#88313) 2023-02-17 18:50:09 +01:00