If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Optimize use of shadow db in app_controller

RESOLVED FIXED in 3.2

Status

addons.mozilla.org Graveyard
Administration
RESOLVED FIXED
10 years ago
2 years ago

People

(Reporter: morgamic, Assigned: morgamic)

Tracking

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

10 years ago
This afternoon we did an audit of useDbConfig and what app models were doing with what data source.

More models can be using the slaves to give the master db a rest.

This is a tracker bug for optimizing use of our db slaves and the rotation of weighted servers set using the feature from bug 400451.
(Assignee)

Comment 1

10 years ago
Created attachment 303192 [details] [diff] [review]
Adding forceShadowDb() to app_controller

This allows us to iterate through Controller->uses and set useDbConfig for controller models and their associated models, goes down 1 level through associations.

Also added manual useDbConfig sets to force certain queries to use the shadow db in the AMO component.  Did not do this for checkOwnership() though.
Attachment #303192 - Flags: review?(clouserw)
(Assignee)

Comment 2

10 years ago
Created attachment 303199 [details] [diff] [review]
v2, adding cache headers for rest layout
Attachment #303192 - Attachment is obsolete: true
Attachment #303199 - Flags: review?(clouserw)
Attachment #303192 - Flags: review?(clouserw)
Comment on attachment 303199 [details] [diff] [review]
v2, adding cache headers for rest layout

This is already live, so...yay.
Attachment #303199 - Flags: review?(clouserw) → review+
(Assignee)

Updated

10 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.