[7u6] Request for approval / patch for review : 7180240 : Disable alternative string hashing by default

David Holmes david.holmes at oracle.com
Wed Jun 27 15:00:32 PDT 2012


Hi Mike,

This seems to disable alternate hashing by default as described.

Just to be clear, ConcurrentHashMap previously always enabled alternate 
hashing by default, now it is always disabled.

David

On 28/06/2012 7:34 AM, Mike Duigou wrote:
> Hello all;
>
> Following testing and feedback the alternative hashing string keys in hash maps which was introduced in CR#7126277 is going to be disabled by default in 7u6. Developers can still enable the alternative hashing but by default it will be disabled. More time is required for developers to test their applications and correct improper usages before this feature can be enabled as the default behaviour. The alternative hashing of String keys feature remains the default for Java 8 and may become the default for Java 7 in a future release.
>
> Developers are strongly encouraged test their applications by enabling the alternative string hashing feature before it does become the default behaviour. The alternative Sring hashing feature is enabled by setting the system property, jdk.map.althashing.threshold to a value smaller than the capacity of the maps to be tested. The future default is likely to be "512" which will have the effect of enabling alternative hashing of string keys for all maps who's capacity is larger than 511 entries. Small maps only encounter limited impact from collisions and the higher threshold also masks incidental dependence upon iteration order that may be present in those maps. For the most rigorous testing, set the jdk.map.althashing.threshold property to "1" which will force all maps to use alternative string hashing.
>
> The current patch for review:
>
> http://cr.openjdk.java.net/~mduigou/7180240/0/webrev/
>
> This change is not a back port because jdk8 uses a different implementation and is unaffected.
>
> When approved and reviewed I intend to push it to
>   ssh://hg.openjdk.java.net/jdk7u/jdk7u-dev-gate/jdk
>
> Regards,
>
> Mike



More information about the jdk7u-dev mailing list