Application settings may not be invalidated if migrations are run
I ran into this in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5532#note_83567366:
- When unicorn starts up, it will store the latest
migrations_hash - If I run migrations while unicorn is running, this changes the latest
migrations_hash - Updates to application settings will be invalidating the cache key with the old value in step 1.
- In an HA environment, other unicorn workers may start up after step 2 and use the other cached value.
The problem here is that we can't guarantee that migrations_hash won't change while the unicorn worker is running. We may need to periodically update this value or not rely on it.
/cc: @rymai