[
https://issues.apache.org/jira/browse/GEODE-3021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045217#comment-16045217
]
ASF subversion and git services commented on GEODE-3021:
--------------------------------------------------------
Commit d49e87969a6535e67b00c5ddbfba6915063e4f2e in geode's branch
refs/heads/release/1.2.0 from [~huynhja]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=d49e879 ]
GEODE-3021: Any call after the first to setPdxStringFlag should no-op
* The flag isIndexedPdxKeysFlagSet is now checked before setting pdx string
flag
(cherry picked from commit f34d04754f27ad8f577ba54d0d0f18880322eaf7)
> OQL Index isIndexedPdxKeys potential concurrency issue
> ------------------------------------------------------
>
> Key: GEODE-3021
> URL: https://issues.apache.org/jira/browse/GEODE-3021
> Project: Geode
> Issue Type: Bug
> Components: querying
> Reporter: Jason Huynh
> Assignee: Jason Huynh
> Fix For: 1.3.0
>
>
> The boolean isIndexedPdxKeys is set in a synchronized method. However
> multiple threads could be making a call to this method, the last caller would
> set the flag based on it's key, either true or false, but the previous
> callers could have meant to set it to the opposite.
> This method sets isIndexedPdxKeysFlagSet afterwards and hopes that callers to
> this method check this flag first. However, again, multiple threads could
> have checked this flag, seen it as false, and then all attempted to call the
> synchronized method.
> The solution is to probably check the isIndexedPdxKeysFlagSet flag in the
> method also. That way, if another thread had already completed
> setPdxStringFlag(), the next call would be a no-op.
> The current issue will lead to possible class cast exceptions from String to
> PdxString or vice versa
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)