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