Hello,
I have the same problem with PopulateTopicsTotalProjectsCountCache migration job while testing migration from 14.0.12 to 14.7.6. It is listed as pending whereas it seems to have successfully completed:
$ grep PopulateTopicsTotalProjectsCountCache /var/log/gitlab/sidekiq/current |grep ‘“job_status”:“done”’
{“severity”:“INFO”,“time”:“2022-03-28T06:49:59.005Z”,“retry”:3,“queue”:“background_migration”,“version”:0,“class”:“BackgroundMigrationWorker”,“args”:[“PopulateTopicsTotalProjectsCountCache”,"[1, 40]"],“jid”:“ccf21be2ff0d115f3ea9894c”,“created_at”:“2022-03-28T06:47:42.382Z”,“meta.caller_id”:“SchedulePopulateTopicsTotalProjectsCountCache”,“meta.feature_category”:“database”,“correlation_id”:“18040053f370d2bffac60d6aef8143b2”,“worker_data_consistency”:“always”,“scheduled_at”:“2022-03-28T06:49:42.382Z”,“idempotency_key”:“resque:gitlab:duplicate:background_migration:462b7d71e327c2df1e7f0ee6b13e36f2763e97726fac45574db2dbf4bdb970e1”,“enqueued_at”:“2022-03-28T06:49:58.878Z”,“job_size_bytes”:48,“pid”:18189,“message”:“BackgroundMigrationWorker JID-ccf21be2ff0d115f3ea9894c: done: 0.120601 sec”,“job_status”:“done”,“scheduling_latency_s”:0.00693,“enqueue_latency_s”:16.495442,“redis_calls”:3,“redis_duration_s”:0.003609,“redis_read_bytes”:15,“redis_write_bytes”:559,“redis_queues_calls”:1,“redis_queues_duration_s”:0.000183,“redis_queues_read_bytes”:10,“redis_queues_write_bytes”:338,“redis_shared_state_calls”:2,“redis_shared_state_duration_s”:0.003426,“redis_shared_state_read_bytes”:5,“redis_shared_state_write_bytes”:221,“db_count”:7,“db_write_count”:3,“db_cached_count”:0,“db_replica_count”:0,“db_primary_count”:7,“db_replica_cached_count”:0,“db_primary_cached_count”:0,“db_replica_wal_count”:0,“db_primary_wal_count”:0,“db_replica_wal_cached_count”:0,“db_primary_wal_cached_count”:0,“db_replica_duration_s”:0.0,“db_primary_duration_s”:0.029,“cpu_s”:0.013979,“mem_objects”:6781,“mem_bytes”:1349848,“mem_mallocs”:4706,“mem_total_bytes”:1621088,“duration_s”:0.120601,“completed_at”:“2022-03-28T06:49:59.005Z”,“load_balancing_strategy”:“primary”,“db_duration_s”:0.067683}
I have had the same kind of problem in the past during update to 13.8.8 with BackfillJiraTrackerDeploymentType2. This was solved with:
$ gitlab-rails console
Gitlab::Database::BackgroundMigrationJob.pending.where(class_name: “BackfillJiraTrackerDeploymentType2”).find_each do |job|
puts Gitlab::Database::BackgroundMigrationJob.mark_all_as_succeeded(“BackfillJiraTrackerDeploymentType2”, job.arguments)
end
See Upgrading GitLab | GitLab
Mathieu