[00:11:17] ori: I thought I would see a port of the C query sorting code to PHP, but it is just sort() [00:13:20] so matching will be a bit more tolerant in PHP, ignoring array order and the order of duplicate parameters [00:14:30] I guess that's fine, but maybe it should have a comment [00:25:27] I'm writing that on gerrit [00:31:25] Thanks for the review. It seemed wiser to make the matching order-independent, rather than commit (implicitly or explicitly) to having the CDN layer and MediaWiki sort query parameters in the same order. [00:34:50] As you point out, it doesn't make a difference -- as long as the CDN (a) imposes the same order on both client requests and purges from MediaWiki, and (b) as long as it maintains the relative order of duplicate parameters and doesn't otherwise alter request semantics [00:41:26] we also can't implement sort() in varnish because it would alter request semantics -- ?foo[]=b&foo[]=a needs to stay in that order [00:45:18] yeah, can't do sort() in Varnish but it is possible to port compa() to PHP [00:45:44] I believe PHP's usort() will provide stable sorting of elements that are equal, i.e. the closure returns zero [01:20:23] can do, we'd have to separate keys from values, but what would be the point? [01:39:15] wow, getting 502s from google search [01:43:03] no point, whatever [01:44:16] there is an unresolved comment about the lack of a test for a mismatch in the base part, /Title !== /Foo [01:45:46] I added coverage, didn't hit reply yet [01:47:33] uh no sorry [01:47:35] I didn't [01:47:51] doing [01:55:32] done [02:12:41] btw the other day when the codfw/eqiad performance gap was discussed I toyed around with how to do repeat benchmarks of a CLI entrypoint in prod and learned that perf stat takes -r, --repeat= [02:13:01] so this seems handy in a pinch: [02:13:08] $ perf stat -r10 sudo -u www-data php /srv/mediawiki/multiversion/MWScript.php /srv/mediawiki/php-1.39.0-wmf.22/maintenance/getText.php --wiki=test2wiki Foobar >/dev/null [02:14:29] with '--table' you get the time for each run too [02:15:58] it's 'perf stat sudo' rather than 'sudo perf stat' because www-data doesn't have access to pmu events [02:52:05] handy [03:01:15] thanks for the feedback / code review, good night [09:45:40] Guessing the Google 502s were at least somewhat widespread for US East, https://mastodon.social/@molly0xfff/108790360985391686 [13:50:28] I think it affected multiple regions across the world