[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-30 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

Brad Jorsch bjor...@wikimedia.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-29 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

--- Comment #8 from Aaron Schulz aschulz4...@gmail.com ---
(In reply to Brad Jorsch from comment #7)
 (In reply to Aaron Schulz from comment #3)
  As for the duplicates already there, I guess the cache can just be
  cleared/rebuilt.
 
 Do we have a script for that, or is it more along the lines of use sql.php
 to delete all the rows then maintenance/updateSpecialPages.php with --only
 to rebuild it?

That it. I just deleted the excess rows on enwiki manually in eval.php:

$dbw=wfGetDB(DB_MASTER);
$res = $dbw-query(SELECT qcc_title FROM querycachetwo WHERE
qcc_type='activeusers' AND qcc_namespace = 2 GROUP BY qcc_title HAVING COUNT(*)
 1);
$titles = array(); foreach ( $res as $row ) { $titles[] = $row-qcc_title; }
$dbw-delete( 'querycachetwo', array( 'qcc_type' = 'activeusers', 'qcc_title'
= $titles ) );

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-29 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

--- Comment #9 from Brad Jorsch bjor...@wikimedia.org ---
Ok. We know commonswiki still needs it, and may as well do it for all wikis. If
you don't get to it this afternoon (your time) I'll do it tomorrow morning (my
time).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-29 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

--- Comment #10 from Gerrit Notification Bot gerritad...@wikimedia.org ---
Change 161664 abandoned by Hoo man:
Don't INNER JOIN querycachetwo in ApiQueryAllUsers

Reason:
I guess someone came up with some other solution

https://gerrit.wikimedia.org/r/161664

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-29 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

--- Comment #11 from Aaron Schulz aschulz4...@gmail.com ---
(In reply to Brad Jorsch from comment #9)
 Ok. We know commonswiki still needs it, and may as well do it for all wikis.
 If you don't get to it this afternoon (your time) I'll do it tomorrow
 morning (my time).

I ran it on all wikis just now.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-24 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

--- Comment #6 from Gerrit Notification Bot gerritad...@wikimedia.org ---
Change 162287 merged by jenkins-bot:
Fixes to prevent duplicate rows in ActiveUser cache

https://gerrit.wikimedia.org/r/162287

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-24 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

--- Comment #7 from Brad Jorsch bjor...@wikimedia.org ---
(In reply to Aaron Schulz from comment #3)
 As for the duplicates already there, I guess the cache can just be
 cleared/rebuilt.

Do we have a script for that, or is it more along the lines of use sql.php to
delete all the rows then maintenance/updateSpecialPages.php with --only to
rebuild it?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-24 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

Brad Jorsch bjor...@wikimedia.org changed:

   What|Removed |Added

 Status|PATCH_TO_REVIEW |NEW

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

--- Comment #4 from Aaron Schulz aschulz4...@gmail.com ---
Also could be the connection dropping and reconnecting in cli mode when run for
$wgSpecialPageCacheUpdates. The DB layer will reconnect but the lock will be
gone.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

--- Comment #5 from Gerrit Notification Bot gerritad...@wikimedia.org ---
Change 162287 had a related patch set uploaded by Aaron Schulz:
Fixes to prevent duplicate rows in ActiveUser cache

https://gerrit.wikimedia.org/r/162287

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-22 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

Brad Jorsch bjor...@wikimedia.org changed:

   What|Removed |Added

 CC||aschulz4...@gmail.com

--- Comment #2 from Brad Jorsch bjor...@wikimedia.org ---
But the rows there *should* be unique: SpecialActiveUsers::doQueryCacheUpdate()
takes a lock to make sure only one process is updating at a time, and with the
lock held it uniquifies the list of names to be inserted against what's already
in the database.

Aaron, any ideas?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-22 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

--- Comment #3 from Aaron Schulz aschulz4...@gmail.com ---
(In reply to Brad Jorsch from comment #2)
 But the rows there *should* be unique:
 SpecialActiveUsers::doQueryCacheUpdate() takes a lock to make sure only one
 process is updating at a time, and with the lock held it uniquifies the list
 of names to be inserted against what's already in the database.
 
 Aaron, any ideas?

The updating method should make sure it doesn't not happen in a transaction
unless that transaction started after the lock() call. Alternatively, the query
that gets the existing names (doing 'qcc_title' = array_keys( $names ) ))
could use LOCK IN SHARE MODE. 

Both of these get around any stale snapshots. The i18n staleness message could
use tweaking for the first option in case DB writes are already pending from
other stuff and the update gets deferred till post commit. The user might not
see any results if it's the first time the cache was filled.

As for the duplicates already there, I guess the cache can just be
cleared/rebuilt.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-21 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

Andre Klapper aklap...@wikimedia.org changed:

   What|Removed |Added

   Priority|Unprioritized   |High

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-20 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

--- Comment #1 from Gerrit Notification Bot gerritad...@wikimedia.org ---
Change 161664 had a related patch set uploaded by Hoo man:
Don't INNER JOIN querycachetwo in ApiQueryAllUsers

https://gerrit.wikimedia.org/r/161664

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71086] ApiQueryAllUsers with auactiveusers fails on duplicate querycachetwo rows

2014-09-20 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71086

Gerrit Notification Bot gerritad...@wikimedia.org changed:

   What|Removed |Added

 Status|NEW |PATCH_TO_REVIEW

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l