[MediaWiki r110435]: New comment added, and revision status changed
MediaWiki Mail <
wiki@...>
2012-02-01 02:17:23 GMT
"Tim Starling" changed the status of MediaWiki.r110435 to "ok" and commented it.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/110435#c30322
Old Status: new
> New Status: ok
Commit summary for MediaWiki.r110435:
Expanded 'shardViaHashLevels' config var in FileBackendStore to be able to recognize FileRepo-style
deleted zone hash paths (which are different than for the other zones).
Tim Starling's comment:
You should probably throw an exception if the base is something other than 16 or 36, or if the number of levels
is something other than 0 or 2, rather than ignoring the setting.
<pre>
- $numShards = 1 << ( $digits * 4 );
+ $numShards = pow( $base, $digits );
</pre>
I was worried about whether pow() is exact for integer arguments, so I checked the source. It is exact.