Enable ActiveRecord patch for caching typemap in production
Production Change
Change Summary
This sets an ENV var to enable a patch to the PostgresQL Adapter so that we don't have to query for all available types every time a connection is opened. We cache this in memory because this is static data and only changes when a PG extension is added / removed.
Related to gitlab-org/gitlab#331786 (closed)
For reference, this is the MR that added the patch behind an ENV flag: gitlab-org/gitlab!63034 (merged)
Change Details
- Services Impacted - Web (Puma), Sidekiq
- Change Technician - @engwan
- Change Reviewer - @devin
- Time tracking - Time, in minutes, needed to execute all change steps, including rollback
- Downtime Component - If there is a need for downtime, include downtime estimate here
Detailed steps for the change
Pre-Change Steps - steps to be completed before execution of the change
Estimated Time to Complete (mins) - Estimated Time to Complete in Minutes
-
Set label changein-progress on this issue
Change Steps - steps to take to execute the change
Estimated Time to Complete (mins) - Estimated Time to Complete in Minutes
-
Merge gitlab-com/gl-infra/k8s-workloads/gitlab-com!921 (merged) -
Merge https://gitlab.com/gitlab-com/gl-infra/chef-repo/-/merge_requests/94 -
Rollout the config changes (Not sure if anything needs to be done here or if it's automatic after above MRs are merged)
(We could also start with just k8s and wait for it to be rolled out and verify that it works fine then move on to the VMs)
Post-Change Steps - steps to take to verify the change
Estimated Time to Complete (mins) - Estimated Time to Complete in Minutes
-
Verify that we don't see new errors in Sentry -
Check that the rate of execution of this statement drops
Rollback
Rollback steps - steps to be taken in the event of a need to rollback this change
Estimated Time to Complete (mins) - Estimated Time to Complete in Minutes
-
Revert gitlab-com/gl-infra/k8s-workloads/gitlab-com!921 (merged) -
Revert https://gitlab.com/gitlab-com/gl-infra/chef-repo/-/merge_requests/94
Monitoring
Key metrics to observe
-
Metric: Web service error ratio
- Location: https://dashboards.gitlab.net/d/web-main/web-overview?orgId=1
- What changes to this metric should prompt a rollback: increased rate of errors
-
Metric: Sidekiq service error ratio
- Location: https://dashboards.gitlab.net/d/sidekiq-main/sidekiq-overview?orgId=1
- What changes to this metric should prompt a rollback: increased rate of errors
Summary of infrastructure changes
-
Does this change introduce new compute instances? No -
Does this change re-size any existing compute instances? No -
Does this change introduce any additional usage of tooling like Elastic Search, CDNs, Cloudflare, etc? No
Changes checklist
-
This issue has a criticality label (e.g. C1, C2, C3, C4) and a change-type label (e.g. changeunscheduled, changescheduled) based on the Change Management Criticalities. -
This issue has the change technician as the assignee. -
Pre-Change, Change, Post-Change, and Rollback steps and have been filled out and reviewed. -
Necessary approvals have been completed based on the Change Management Workflow. -
Change has been tested in staging and results noted in a comment on this issue. -
A dry-run has been conducted and results noted in a comment on this issue. -
SRE on-call has been informed prior to change being rolled out. (In #production channel, mention @sre-oncall
and this issue and await their acknowledgement.) -
There are currently no active incidents.