Update merge request diff files_count cache when removing diffs
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.
Showing
Please register or sign in to comment