getpersonas needs to send searches and general lookups to the slave database server

RESOLVED FIXED

Status

Websites Graveyard
getpersonas.com
--
major
RESOLVED FIXED
9 years ago
5 years ago

People

(Reporter: justdave, Unassigned)

Tracking

Details

Attachments

(1 attachment, 1 obsolete attachment)

v2
16.88 KB, patch
telliott
: review+
telliott
: review+
Details | Diff | Splinter Review
We had some load issues with getpersonas.com tonight because of the 3.6 major update and getpersonas being advertised on the whatsnew page.

In the process of troubleshooting that, it was discovered that the application does not know how to split off queries to a read-only slave database.  It will be really hard to scale the app without slave DB support, so this should get added as soon as possible.
Created attachment 432172 [details] [diff] [review]
v1
Attachment #432172 - Flags: review?(telliott)
Attachment #432172 - Flags: review?(james)
Comment on attachment 432172 [details] [diff] [review]
v1

Looks good. If you're seeing a ton of DB traffic, you might want to jack up the number of mysql open connections and use persistant connections to the DB here. It'll save you a teeny amount of overhead per session.
Attachment #432172 - Flags: review?(telliott) → review+
Comment on attachment 432172 [details] [diff] [review]
v1

Some DELETE and REPLACE, and one UPDATE, statements need to get pointed to the
master.

lib/storage.php
- log_action()
- delete_user_favorite()
- delete_persona_from_favorites()
- reject_persona_edit()
- delete_category()
- direct_personas_input()
- is_ssc()
- set_mozilla_persona_ids()

lib/user.php
- delete_user()
- promote_approver()
Attachment #432172 - Flags: review?(james) → review-
Created attachment 432186 [details] [diff] [review]
v2
Attachment #432172 - Attachment is obsolete: true
Attachment #432186 - Flags: review?(james)
Attachment #432186 - Flags: review?(telliott)
Comment on attachment 432186 [details] [diff] [review]
v2

Looks like you caught everything.
Attachment #432186 - Flags: review?(james) → review+
Attachment #432186 - Flags: review?(telliott)
Attachment #432186 - Flags: review?
Attachment #432186 - Flags: review+
Comment on attachment 432186 [details] [diff] [review]
v2

The new ones seem fine. If there's concern over missing some, best thing to do is reverse the process and have a new handle for the slave
r64111
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Comment on attachment 432186 [details] [diff] [review]
v2

cleaning out old reviews. Not sure why this one wanted me twice, but whatever
Attachment #432186 - Flags: review? → review+
(Assignee)

Updated

5 years ago
Component: getpersonas.com → getpersonas.com
Product: Websites → Websites Graveyard
You need to log in before you can comment on or make changes to this bug.