Bug #82203 | com.mysql.fabric.HashShardMapping is not thread safe | ||
---|---|---|---|
Submitted: | 12 Jul 2016 16:52 | Modified: | 8 Feb 2017 21:42 |
Reporter: | Cosmin Mutu | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | 5.1.39 | OS: | Any |
Assigned to: | Filipe Silva | CPU Architecture: | Any |
Tags: | connectorj, hash, HashShardMapping, safe, thread |
[12 Jul 2016 16:52]
Cosmin Mutu
[13 Jul 2016 17:23]
Filipe Silva
Hi Cosmin Mutu, Thank you for this bug report. It was verified as described.
[8 Feb 2017 21:42]
Daniel So
Posted by developer: Added the following entry to the Connector/J 5.1.41 changelog: "In a Fabric setup, when multiple threads required to have hashes computed, an ArrayIndexOutOfBoundsException might be thrown from inside HashShardMapping. This fix prevents the issue by having HashShardMapping.getShardIndexForKey() synchronized."