Skip to content

Resolve "Service ping integration with batched background migrations"

What does this MR do and why?

We are introducing a new metric to the service ping in this merge request.

The goal of this metric is to collect the number of failed jobs per batched background migration. This information will help us to understand the impact of batched background migrations in self-host customers.

Query:

SELECT "batched_background_migrations"."table_name", "batched_background_migrations"."job_class_name", COUNT(batched_jobs) AS number_of_failed_jobs FROM "batched_background_migrations" INNER JOIN "batched_background_migration_jobs" "batched_jobs" ON "batched_jobs"."batched_background_migration_id" = "batched_background_migrations"."id" WHERE "batched_jobs"."status" = 2 GROUP BY "batched_background_migrations"."table_name", "batched_background_migrations"."job_class_name" ORDER BY table_name, job_class_name

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #416718 (closed)

Edited by Diogo Frazão

Merge request reports