jcrespo raised the priority of this task from "High" to "Unbreak Now!".
jcrespo added a subscriber: ori.
jcrespo added a comment.

Sorry, reverting back to Unbreak now, because this is breaking almost all wikis 
and the problems have been spoted now on production machines, not only on 
support machines:

Executing things like this:

  UPDATE /* Wikibase\Client\Usage\Sql\EntityUsageTable::touchUsages  */  
`wbc_entity_usage` SET eu_touched = '20150619102700' 
  WHERE eu_page_id = '1256862' AND ((eu_aspect = 'L.hu' AND eu_entity_id = 
'Q1017251') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1017251') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1017287') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1017287') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1019531') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1019531') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1022151') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1022151') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1076731') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1076731') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1272631') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1272631') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1632441') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1632441') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1689740') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1689740') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1734119') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1734119') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1756917') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1756917') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1762083') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1762083') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1767147') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1767147') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q176874') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q176874') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1784043') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1784043') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1785657') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1785657') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1812906') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1812906') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1823175') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1823175') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1846197') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1846197') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1937519') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1937519') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1938332') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1938332') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1957359') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1957359') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1969100') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1969100') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1970044') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1970044') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q1996076') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q1996076') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2016409') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2016409') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2020661') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2020661') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2034240') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2034240') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2036571') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2036571') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2050445') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2050445') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2065507') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2065507') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2067264') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2067264') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2099112') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2099112') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2100308') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2100308') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2109649') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2109649') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2129186') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2129186') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2153515') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2153515') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2160020') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2160020') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2175955') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2175955') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2193693') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2193693') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2197198') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2197198') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2220097') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2220097') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2243697') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2243697') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2244200') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2244200') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2263864') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2263864') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2264335') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2264335') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2287034') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2287034') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2290410') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2290410') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2304891') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2304891') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2322979') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2322979') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2324192') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2324192') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2335877') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2335877') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2344334') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2344334') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2366179') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2366179') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2392305') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2392305') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2420887') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2420887') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2442130') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2442130') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2444902') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2444902') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2464264') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2464264') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2472043') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2472043') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2473413') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2473413') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2479323') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2479323') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2493498') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2493498') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2522268') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2522268') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2524669') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2524669') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2532729') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2532729') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2547458') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2547458') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2648623') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2648623') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2684713') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2684713') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2687667') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2687667') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2697539') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2697539') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2700513') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2700513') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2700529') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2700529') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2700756') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2700756') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2700807') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2700807') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2700827') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2700827') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2700855') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2700855') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2700967') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2700967') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2702116') 
  OR (eu_aspect = 'X' AND eu_entity_id = 'Q2702116') 
  OR (eu_aspect = 'O' AND eu_entity_id = 'Q2702116') 
  OR (eu_aspect = 'S' AND eu_entity_id = 'Q2702116') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2702116') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2702155') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2702155') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2702170') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2702170') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2702187') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2702187') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2702196') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2702196') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2702237') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2702237') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q2861721') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q2861721') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q375047') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q375047') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q388235') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q388235') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q388310') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q388310') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q393519') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q393519') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q393969') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q393969') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q520730') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q520730') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q521971') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q521971') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q534709') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q534709') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q582531') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q582531') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q585171') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q585171') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q593386') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q593386') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q593451') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q593451') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q601536') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q601536') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q604863') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q604863') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q608564') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q608564') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q628047') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q628047') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q630183') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q630183') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q647401') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q647401') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q656603') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q656603') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q729166') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q729166') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q735118') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q735118') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q739608') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q739608') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q770877') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q770877') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q812766') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q812766') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q838333') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q838333') 
  OR (eu_aspect = 'X' AND eu_entity_id = 'Q838333') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q896888') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q896888') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q927541') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q927541') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q932034') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q932034') 
  OR (eu_aspect = 'L.hu' AND eu_entity_id = 'Q962599') 
  OR (eu_aspect = 'T' AND eu_entity_id = 'Q962599'))\G

creates a 1 minute lag on slaves (not only on s3), and when lag occurs, slaves 
are automatically depooled, creating connection spikes. I woud like the feature 
disabled until we can agree on a different way to do this.

You seem to be implementing a queue/message system. A relational database, that 
is replicated geographically is probably not the right place for this kind of 
data, as it probably doesn't need the availability and reliability of MySQL (it 
could be stored once, in memory Redis?). MySQL follow a OLTP model, so less 
suitable for this kind of queries. Even if we need them to be on the same 
schema, the model could be greatly improved- right now this is affecting other 
slave's reads.

ccing @Ori as he told me he could help for query performance reasons.


TASK DETAIL
  https://phabricator.wikimedia.org/T107319

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: jcrespo
Cc: ori, jcrespo, Aklapper, aude, Wikidata-bugs, Malyacko



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to