GitHub Import rake task calls the same git branch command 3 times in a row
Monitoring a large import on a server I noticed (using
watch) that the following command appeared 3 times in a row, with different PIDs:
git branch --contains commit_sha
As an average, the command took originally ~7 seconds to run, but as the refs were growing, the average time went up to ~1:15 minutes.
This could be due to the number of refs, however, the anomaly was that the same command ran 3 times in a row on the same
commit_sha. I've confirmed that noticing that the CPU time was reset and the PID changed. That means the import was taking ~4 mins total to process those 3 checks, and these commands are run for every MR imported.
The number of refs on the import instance was large, but they were expected to be quite large in any case due to the total number of MRs being quite high.