Skip to content

sql-migrate: Update storage_repositories table

Pavlo Strokov requested to merge ps-fix-link-repo-14-4 into 14-4-stable

The batch update query introduced to mitigate limitation of the PostgreSQL on amount of payload size that can be send by the NOTIFY function was missing a condition in the update statements. Because of that the payload contained changes not for the N storage-repository entries, but for (N * num_of_storages) storage-repository entries. So initial size of 150 becomes 450 if 3 storages used.

The change also includes significantly reduced batch size. The calculation was done on the test data similar to the production used data. The approximate payload size for single row is about 470 bytes. As max payload size is 8k bytes we are allowed to use no more than 16~17 entries. To be more realistic we reduce it to 14.

Part of: #3806 (closed)

Changelog: fixed

Merge request reports