🏡 Open source home automation that puts local control and privacy first.
Go to file
J. Nick Koston 0a6ce35e30 Chunk MariaDB and Postgresql data migration to avoid running out of buffer space (#86680)
* Chunk MariaDB data migration to avoid running out of buffer space

This will make the migration slower but since the innodb_buffer_pool_size
is using the defaul to 128M and not tuned to the db size there is a
risk of running out of buffer space for large databases

* Update homeassistant/components/recorder/migration.py

* hard code since bandit thinks its an injection

* Update homeassistant/components/recorder/migration.py

* guard against manually modified data/corrupt db

* adjust to 10k per chunk

* adjust to 50k per chunk

* memory still just fine at 250k

* but slower

* commit after each chunk to reduce lock pressure

* adjust

* set to 0 if null so we do not loop forever (this should only happen if the data is missing)

* set to 0 if null so we do not loop forever (this should only happen if the data is missing)

* tweak

* tweak

* limit cleanup

* lower limit to give some more buffer

* lower limit to give some more buffer

* where required for sqlite

* sqlite can wipe as many as needed with no limit

* limit on mysql only

* chunk postgres

* fix limit

* tweak

* fix reference

* fix

* tweak for ram

* postgres memory reduction

* defer cleanup

* fix

* same order
2023-01-27 22:53:57 -05:00
.devcontainer Revert "Add SSHd and GH CLI to devcontainer to support `gh net`" (#86360) 2023-01-21 21:18:22 -05:00
.github Introduce ruff (eventually replacing autoflake, pyupgrade, flake8) (#86224) 2023-01-24 12:15:16 +01:00
.vscode Introduce ruff (eventually replacing autoflake, pyupgrade, flake8) (#86224) 2023-01-24 12:15:16 +01:00
docs Small adjustments to API docs config (#86474) 2023-01-23 19:58:39 +01:00
homeassistant Chunk MariaDB and Postgresql data migration to avoid running out of buffer space (#86680) 2023-01-27 22:53:57 -05:00
machine Update Builder & Wheels + support yellow (#73896) 2022-06-23 13:58:24 +02:00
pylint/plugins Run `flake8` on more files (#85333) 2023-01-16 20:53:14 +01:00
rootfs Fix logging & exit code reporting to S6 on HA shutdown (#72921) 2022-06-02 19:49:08 +02:00
script Remove ability to ignore coverage violations (#86597) 2023-01-25 14:27:16 +01:00
tests Remove esphome password from config flow data if not needed (#86763) 2023-01-26 21:47:00 -05:00
.core_files.yaml Trigger full CI on Text integration changes (#82907) 2022-11-29 15:49:10 +01:00
.coveragerc Remove ability to ignore coverage violations (#86597) 2023-01-25 14:27:16 +01:00
.dockerignore Not to Tox (#76582) 2022-11-23 14:40:37 +01:00
.gitattributes highlight Dockerfile.dev as Dockerfile in github ui (#36933) 2020-06-22 14:45:57 +02:00
.gitignore Not to Tox (#76582) 2022-11-23 14:40:37 +01:00
.hadolint.yaml Add hadolint to CI (#34758) 2020-04-27 12:09:31 +02:00
.pre-commit-config.yaml Update Ruff to 0.0.231, enable D401 (#86520) 2023-01-24 13:57:08 +01:00
.prettierignore Add Leviton brand (#79244) 2022-09-29 12:28:51 +02:00
.readthedocs.yml Update readthedocs config (#65230) 2022-01-30 20:15:32 -08:00
.strict-typing Add Mopeka integration (#86500) 2023-01-25 12:28:13 -05:00
.yamllint Add yamllint (in pre-commit and CI) (#33676) 2020-04-05 10:33:45 +02:00
CLA.md
CODEOWNERS Add Mopeka integration (#86500) 2023-01-25 12:28:13 -05:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md (#73468) 2022-06-23 01:41:22 +02:00
CONTRIBUTING.md Use core GitHub URL in contributing guidelines (#41083) 2020-10-02 20:42:33 +02:00
Dockerfile 75142 Added QEMU_CPU ARG to the dockerfile (#86178) 2023-01-19 10:22:23 +01:00
Dockerfile.dev Drop Python 3.9 support (#85456) 2023-01-22 20:40:33 +01:00
LICENSE.md
MANIFEST.in Move remaining keys to `setup.cfg` (#65154) 2022-01-28 20:18:09 -08:00
README.rst Update featured integrations image (#76011) 2022-08-02 09:09:24 +02:00
build.yaml Update base image to 2022.11.0 (#82527) 2022-11-24 19:21:42 +01:00
codecov.yml Remove ability to ignore coverage violations (#86597) 2023-01-25 14:27:16 +01:00
mypy.ini Add Mopeka integration (#86500) 2023-01-25 12:28:13 -05:00
pyproject.toml Bumped version to 2023.2.0b2 2023-01-26 21:47:21 -05:00
requirements.txt Bump httpx to 0.23.3 (#86614) 2023-01-25 11:40:46 +01:00
requirements_all.txt Bump aioshelly to 5.3.1 (#86751) 2023-01-26 21:46:56 -05:00
requirements_docs.txt Refactor API documentation (#33217) 2020-03-25 13:21:04 -07:00
requirements_test.txt Update pre-commit to 3.0.0 (#86518) 2023-01-24 13:09:01 +01:00
requirements_test_all.txt Bump aioshelly to 5.3.1 (#86751) 2023-01-26 21:46:56 -05:00
requirements_test_pre_commit.txt Update Ruff to 0.0.231, enable D401 (#86520) 2023-01-24 13:57:08 +01:00
setup.cfg Enable T20 (flake8-print) to ban use of print statements (#86525) 2023-01-24 14:24:21 +01:00

README.rst

Home Assistant |Chat Status|
=================================================================================

Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.

Check out `home-assistant.io <https://home-assistant.io>`__ for `a
demo <https://home-assistant.io/demo/>`__, `installation instructions <https://home-assistant.io/getting-started/>`__,
`tutorials <https://home-assistant.io/getting-started/automation/>`__ and `documentation <https://home-assistant.io/docs/>`__.

|screenshot-states|

Featured integrations
---------------------

|screenshot-integrations|

The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the `section on architecture <https://developers.home-assistant.io/docs/architecture_index/>`__ and the `section on creating your own
components <https://developers.home-assistant.io/docs/creating_component_index/>`__.

If you run into issues while using Home Assistant or during development
of a component, check the `Home Assistant help section <https://home-assistant.io/help/>`__ of our website for further help and information.

.. |Chat Status| image:: https://img.shields.io/discord/330944238910963714.svg
   :target: https://discord.gg/c5DvZ4e
.. |screenshot-states| image:: https://raw.githubusercontent.com/home-assistant/core/master/docs/screenshots.png
   :target: https://home-assistant.io/demo/
.. |screenshot-integrations| image:: https://raw.githubusercontent.com/home-assistant/core/dev/docs/screenshot-integrations.png
   :target: https://home-assistant.io/integrations/