Resolve "Geo: Rake task to force housekeeping on next sync"
What does this MR do?
Adds 3 rake tasks to increase the syncs_since_gc
counter related to each Project in a secondary node. By increasing it to the limit-1
of each desired operation (incremental repack, full repack and GC) we are scheduling it to perform that operation the next time that repository is synced again.
Running it displays a progress bar:
$ geo:git:housekeeping:gc
Progress: |========================================================================================================| 100% Time: 00:00:05
Are there points in the code the reviewer needs to double check?
We already have ruby-progressbar
as dependency (from other gems), but wanted to make it explictly as I want to use it here and in few other places to give better visual feedback on time expensive operations.
This was done in a separate commit that will need to be backported to CE
Why was this MR needed?
This was needed because the way we were syncing repositories in Geo (without using clone) generates a lot of inefficiencies like unpacked objects.
Running this rake task should provide improved performance for us (in GCP migration) and for any existing Geo installations.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
EE specific content should be in the top level /ee
folder -
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
End-to-end tests pass ( package-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #5928 (closed)