matrix-org / rust-synapse-compress-state

A tool to compress some state in a Synapse instance's database
https://pypi.org/project/synapse-auto-compressor/
Apache License 2.0
142 stars 32 forks source link

Aborts the run of the compressor if it will lead to more rows in the database #52

Closed Azrenbeth closed 3 years ago

Azrenbeth commented 3 years ago

BUILDS ON azren/all_options_readme_and_help

This aborts the run of the compressor if it will lead to MORE rows in the database

This will prevent accidently running the generated SQL on the database and increasing storage requirements.

heftig commented 2 years ago

Wouldn't it be better to just default min_saved_rows to 0 or 1?

Azrenbeth commented 2 years ago

Wouldn't it be better to just default min_saved_rows to 0 or 1?

That would work, however a fix to #31 would also be needed in that case too.

I also did it this way in order to draw extra attention to when the compressor is NOT working as opposed to when it's just not working as well as expected, since that might help fix the creating-extra-rows issue in the future