Hello,
I have tried to reattempt the job as explained at Upgrading GitLab | GitLab but the perform method returns nil and the job is still pending:
irb(main):006:1* Gitlab::Database::BackgroundMigrationJob.pending.find_each do |job|
irb(main):007:1* puts "Running pending job '#{job.class_name}' with arguments #{job.arguments}"
irb(main):008:1* result = Gitlab::BackgroundMigration.perform(job.class_name, job.arguments)
irb(main):009:1* puts "Result: #{result}"
irb(main):010:0> end
Running pending job 'PopulateTopicsTotalProjectsCountCache' with arguments [1, 40]
Result:
=> nil
After viewing this thread Database Background Migration job Stuck, I have searched what this job is supposed to modify and it seems to run only one sql query in order to update counts in the topics table:
https://github.com/gitlabhq/gitlabhq/blob/master/lib/gitlab/background_migration/populate_topics_total_projects_count_cache.rb
In my case, the counts seem to be ok so I think I will go ahead and manually mark the job completed:
irb(main):011:0> Gitlab::Database::BackgroundMigrationJob.mark_all_as_succeeded(‘PopulateTopicsTotalProjectsCountCache’, [1, 40])
=> 1
Mathieu