From fb55933b0a72257aa7f8601e1e3e5c93fa99ad78 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 1 Feb 2023 11:34:40 -0600 Subject: [PATCH] Reduce chance of queue overflow during schema migration (#87090) Co-authored-by: Franck Nijhof --- homeassistant/components/recorder/const.py | 2 +- tests/components/recorder/test_websocket_api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/recorder/const.py b/homeassistant/components/recorder/const.py index 8db4b43e04e..379185bec7b 100644 --- a/homeassistant/components/recorder/const.py +++ b/homeassistant/components/recorder/const.py @@ -19,7 +19,7 @@ EVENT_RECORDER_HOURLY_STATISTICS_GENERATED = "recorder_hourly_statistics_generat CONF_DB_INTEGRITY_CHECK = "db_integrity_check" -MAX_QUEUE_BACKLOG = 40000 +MAX_QUEUE_BACKLOG = 65000 # The maximum number of rows (events) we purge in one delete statement diff --git a/tests/components/recorder/test_websocket_api.py b/tests/components/recorder/test_websocket_api.py index 6c0e2f8dfd6..3823b3f1796 100644 --- a/tests/components/recorder/test_websocket_api.py +++ b/tests/components/recorder/test_websocket_api.py @@ -2032,7 +2032,7 @@ async def test_recorder_info(recorder_mock, hass, hass_ws_client): assert response["success"] assert response["result"] == { "backlog": 0, - "max_backlog": 40000, + "max_backlog": 65000, "migration_in_progress": False, "migration_is_live": False, "recording": True,