Geo: Part 2 of Enforce not null merge_request_diffs.external_diff_store
What does this MR do?
Part of #229412 (closed):
When
sync_object_storage
is false,RegistryConsistencyService
calls methods which use the clauseWHERE file_store = 1
. We need to:
- index that field (which we've done).
- make it non-nullable.
So we don't have to add
OR file_store IS NULL
to ensure we process all records. That OR harms performance (see the performance improvement when we removed this clause from LFS objects).
-
Update existing NULL
s to local store:- Post-deployment migration scheduling background jobs to update batches of merge_request_diffs with NULL external_diff_store to the LOCAL value
For more context, part 1 is here !38549 (merged).
Migration output
Up:
== 20200805152108 MigrateNullExternalDiffStoreToLocalValue: migrating =========
== 20200805152108 MigrateNullExternalDiffStoreToLocalValue: migrated (0.0062s)
Down:
== 20200805152108 MigrateNullExternalDiffStoreToLocalValue: reverting =========
== 20200805152108 MigrateNullExternalDiffStoreToLocalValue: reverted (0.0000s)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Edited by Michael Kozono