Last modified: 2014-03-01 16:38:38 UTC
After updating the bucketing configuration (and bumping up the version number), users are not re-bucketed. REPRODUCE: Assuming a config like so: array( 'buckets' => array( 'zero' => 50, 'one' => 50, ), 'version' => 1, ); After initial bucketing, you'll see a cookie (I used the web developer toolbar) like so: Name mediaWiki.user.bucket:mykey Value 1%3Azero And "zero" would be returned. If you then: 1) Update the version in the config from 1 to 2 2) Reload the page (and confirm that you have the new config, of course) 3) Attempt mw.user.bucket It will still return "zero", and the cookie will still have the value "1%3Azero". EXPECTED: A cookie like so, indicating re-bucketing: Name mediaWiki.user.bucket:mykey Value 2%3Azero WORKAROUND: You can pass the version as part of the key: mw.user.bucket( 'mykey@' + cfg.version, cfg ) Which will result in a cookie like this: Name mediaWiki.user.bucket:mykey@2 Value 2%3Azero And will re-bucket when you change the version. FIX: https://svn.wikimedia.org/viewvc/mediawiki/branches/wmf/1.19wmf1/resources/mediawiki/mediawiki.user.js?view=markup ~ line 140, check the version from the cookie against the version in the config, and set bucket to null if they don't match. The check on line 141 will then pass and re-bucketing will occur.
mw.user.bucket has been deprecated in I5a66e1a4 and will not be worked on (unless you submit a patch). Sorry.