Update merge request diff files_count cache when removing diffs
What does this MR do?
The files_count
cache column was created with the assumption that the number of files never changes throughout the life of a diff. However, we have discovered the DeleteDiffFilesWorker
, which removes them (and sets the state of the diff to :without_files
) in some limited cases.
This MR updates the cache columns (both commits_count
and files_count
) so they will be re-recorded on every update. Since updates are rare, the additional cost of this should be very low.
Screenshots
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. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Closes #240921 (closed)
Edited by Nick Thomas