Verify correctness of LFS storage
It seems that we still see reports of people trying to access LFS, but failing. It is due to missing files:
- https://gitlab.com/gitlab-com/support-forum/issues/3261
- https://gitlab.com/gitlab-com/support-forum/issues/3261
To fix that we patched: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18624. The actual fix is https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18624.
This patch is needed as we have problems with data availability. There's no data loss, but people are unable to access their LFS objects till we apply corrective action that is described in comments. It affects a small number of our customers, around a few thousand objects. It happens, because:
- LfsUploader#store! changes object_store to 2, as we have direct_upload configured,
- after_save updates the column value, unintentionally, even when the file did not change.
We mitigate the 2. by updating after_save condition and saving object only once when needed. The 1. gonna be resolved by https://gitlab.com/gitlab-org/gitlab-ce/issues/45955.
Edited by Kamil Trzciński