2021-11-19 The praefect_cloudsql SLI of the praefect service (`main` stage) has an error rate violating SLO
Current Status
gitlab-org/gitaly!4091 (merged) introduced PG12 SQL syntax related to materialized views, causing errors from praefect:
db=praefect_production,user=default STATEMENT: WITH valid_primaries AS MATERIALIZED ( SELECT repository_id FROM valid_primaries ) SELECT virtual_storage, COUNT(*) FROM repositories WHERE NOT EXISTS ( SELECT FROM valid_primaries WHERE valid_primaries.repository_id = repositories.repository_id ) AND repositories.virtual_storage = ANY($1) GROUP BY virtual_storage
db=praefect_production,user=default ERROR: syntax error at or near "MATERIALIZED" at character 26
because the CloudSQL backing praefect is still PG11.
This is not causing any user-visible effect (not on any user-activity gRPC paths), so we are taking a slower approach by reverting the change to GITALY_SERVER_VERSION to rollback just gitaly/praefect; the diff in gitaly between those versions consists solely of this performance optimization MR, so is the minimal possible change to eliminate the errors.
Timeline
Recent Events (available internally only):
- Deployments
- Feature Flag Changes
- Infrastructure Configurations
- GCP Events (e.g. host failure)
All times UTC.
2021-11-19
-
01:45
- Deploy starts -
02:49
- Errors start in praefect; cloudsql error ratio goes to around 5%. -
03:03
- Alert fires -
03:05
- Errors identified, Delivery engaged to discuss possibility of rollback. -
03:07
- @cmiskell declares incident in Slack. No sign of user-facing errors at this stage -
03:50
- Decision made to roll-forward in a limited way by reverting the gitaly version upgrade, which will remove just the problem commit (query change). Issue is confirmed to be non user-facing allowing us the luxury of a more targeted approach than a full deployment rollback, and downgrading this to an S4
Corrective Actions
Corrective actions should be put here as soon as an incident is mitigated, ensure that all corrective actions mentioned in the notes below are included.
- ...
Note: In some cases we need to redact information from public view. We only do this in a limited number of documented cases. This might include the summary, timeline or any other bits of information, laid out in out handbook page. Any of this confidential data will be in a linked issue, only visible internally. By default, all information we can share, will be public, in accordance to our transparency value.
Click to expand or collapse the Incident Review section.
Incident Review
-
Ensure that the exec summary is completed at the top of the incident issue, the timeline is updated and relevant graphs are included in the summary -
If there are any corrective action items mentioned in the notes on the incident, ensure they are listed in the "Corrective Action" section -
Fill out relevant sections below or link to the meeting review notes that cover these topics
Customer Impact
-
Who was impacted by this incident? (i.e. external customers, internal customers)
- ...
-
What was the customer experience during the incident? (i.e. preventing them from doing X, incorrect display of Y, ...)
- ...
-
How many customers were affected?
- ...
-
If a precise customer impact number is unknown, what is the estimated impact (number and ratio of failed requests, amount of traffic drop, ...)?
- ...
What were the root causes?
- ...
Incident Response Analysis
-
How was the incident detected?
- ...
-
How could detection time be improved?
- ...
-
How was the root cause diagnosed?
- ...
-
How could time to diagnosis be improved?
- ...
-
How did we reach the point where we knew how to mitigate the impact?
- ...
-
How could time to mitigation be improved?
- ...
-
What went well?
- ...
Post Incident Analysis
-
Did we have other events in the past with the same root cause?
- ...
-
Do we have existing backlog items that would've prevented or greatly reduced the impact of this incident?
- ...
-
Was this incident triggered by a change (deployment of code or change to infrastructure)? If yes, link the issue.
- ...
Lessons Learned
- ...
Guidelines
Resources
- If the Situation Zoom room was utilised, recording will be automatically uploaded to Incident room Google Drive folder (private)