Skip to content

Staging migrations take over two hours to complete

Summary

Staging migrations take over two hours to complete

The deployment https://ops.gitlab.net/gitlab-com/gl-infra/deployer/-/pipelines/225249 deploys the changes listed at https://gitlab.com/gitlab-org/security/gitlab/compare/160570ab8ca...caa77d48bc0. These changes include a migration that adds the index index_ci_job_artifacts_id_for_terraform_reports, which was added in merge request gitlab-org/gitlab!37498 (merged). In the merge request it is mentioned it took about 30 minutes to run using our database lab. But according to https://gitlab.slack.com/archives/C101F3796/p1597241407197400?thread_ts=1597240293.195800&cid=C101F3796 it has so far taken over 1 hour and 40 minutes:

01:37:08.64127          | CREATE  INDEX CONCURRENTLY "index_ci_job_artifacts_id_for_terraform_reports" ON "ci_job_artifacts"  

About 126 minutes into the job I cancelled it. We need to revert these changes and find a way to run them on staging without taking as much time. Right now the risk of it taking very long on production is simply too great.

Timeline

All times UTC.

2020-08-12

  • 14:42 - yorickpeterse declares incident in Slack using /incident declare command.

Click to expand or collapse the Incident Review section.

Incident Review

Summary

  1. Service(s) affected:
  2. Team attribution:
  3. Minutes downtime or degradation:

Metrics

Customer Impact

  1. Who was impacted by this incident? (i.e. external customers, internal customers)
  2. What was the customer experience during the incident? (i.e. preventing them from doing X, incorrect display of Y, ...)
  3. How many customers were affected?
  4. If a precise customer impact number is unknown, what is the estimated potential impact?

Incident Response Analysis

  1. How was the event detected?
  2. How could detection time be improved?
  3. How did we reach the point where we knew how to mitigate the impact?
  4. How could time to mitigation be improved?

Post Incident Analysis

  1. How was the root cause diagnosed?
  2. How could time to diagnosis be improved?
  3. Do we have an existing backlog item that would've prevented or greatly reduced the impact of this incident?
  4. Was this incident triggered by a change (deployment of code or change to infrastructure. If yes, have you linked the issue which represents the change?)?

5 Whys

Lessons Learned

Corrective Actions

Guidelines

OSZAR »