mirror of
https://github.com/discourse/discourse.git
synced 2025-02-10 05:14:59 +00:00
We were seeing lots of deadlocks deploying this migration. This improves the situation in 2 ways. 1. ddl transaction is avoided, so we hold locks for far shorter times 2. we operate in chunks of a maximum of 100_000 posts (though it is heavily filtered down) * improve code so it is clearer