Closed Bug 618256 Opened 14 years ago Closed 13 years ago

alter get_collection_list_with_timestamps to avoid mysql crash

Categories

(Cloud Services Graveyard :: Server: Sync, defect)

x86_64
Linux
defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tarek, Assigned: tarek)

Details

(Whiteboard: [php: 616435] [qa-])

Attachments

(1 file, 2 obsolete files)

sync 1.5.101116 includes a collection timestamp query that reliably and
simultaneously crashes the mysql servers in production.  it appears to stem
from the subquery i suggested using here.  we have monkeypatched in production
a revised query based on the original sync 1.3 query with one single change,
specifically "GROUP BY username, collection".  this has proven to be sufficient
to reap some performance reward of using the available indexes, without
crashing the mysql server.
old query still present, and we're having random crashes of mysql in staging when running sync tests, so it's very likely this is the root cause.
Severity: normal → blocker
Attached patch Back to the simpler query (obsolete) — Splinter Review
Attachment #506418 - Flags: review?(telliott)
Attachment #506418 - Flags: review?(rsoderberg)
Attached file Back to the simpler query (obsolete) —
added "username" to the group by /
Attachment #506418 - Attachment is obsolete: true
Attachment #506421 - Attachment is obsolete: true
Attachment #506422 - Flags: review?(telliott)
Attachment #506418 - Flags: review?(telliott)
Attachment #506418 - Flags: review?(rsoderberg)
Attachment #506422 - Flags: review?(rsoderberg)
Comment on attachment 506422 [details] [diff] [review]
Back to the simpler query

Can you provide the resulting SQL query as sent to MySQL by the select() function?  r+ otherwise, pending that
SELECT wbo.collection, max(wbo.modified) AS max_1 FROM wbo WHERE wbo.username = %s AND wbo.ttl > %s GROUP BY wbo.username, wbo.collection
Attachment #506422 - Flags: review?(rsoderberg) → review+
Attachment #506422 - Flags: review?(telliott) → review+
commited in http://hg.mozilla.org/services/server-storage/rev/a24268073994
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [php: 616435] → [php: 616435] [qa-]
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: