[
https://issues.apache.org/jira/browse/GEODE-1599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357939#comment-15357939
]
ASF subversion and git services commented on GEODE-1599:
--------------------------------------------------------
Commit ec5578a22c75dbdf7ae698b805307915fcf763a0 in incubator-geode's branch
refs/heads/develop from [~nnag]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=ec5578a ]
GEODE-1599: Array size allocation method was changed to prevent race condition
in CopyOnWriteArray
* toArray(new Statistics[statlist.size()]); was converted to
toArray(new Statistics[0]);
* This is done to avoid a race condition.
* The size of the CopyOnWriteArray may increase after allocating the
size for the array in which the CopyOnWriteArray is to be placed
> Change the method call to allocate memory for the new array {CopyOnWriteArray
> to Array conversion}
> --------------------------------------------------------------------------------------------------
>
> Key: GEODE-1599
> URL: https://issues.apache.org/jira/browse/GEODE-1599
> Project: Geode
> Issue Type: Bug
> Reporter: nabarun
>
> return (Statistics[])statsList.toArray(new Statistics[statlist.size()]); must
> be converted to
> (Statistics[])statsList.toArray(new Statistics[0]);
> This is done to avoid a race condition, where the size of the
> CopyOnWriteArray increases after allocating the size for the array in which
> the CopyOnWriteArray is to be placed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)