[
https://issues.apache.org/jira/browse/GEODE-6842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16858190#comment-16858190
]
ASF subversion and git services commented on GEODE-6842:
--------------------------------------------------------
Commit 610992ae8ba1c8d26756606bb62e871ea846544f in geode's branch
refs/heads/develop from Ryan McMahon
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=610992a ]
GEODE-6842: Making serialization of CqNameToOpHashMap thread safe (#3680)
By making the CqNameToOpHashMap derive from ConcurrentHashMap and
taking a snapshot prior to serialization, we avoid a race where
this map could be mutated by a client registration thread while a
queue GII which includes this map is occuring in another thread.
> Possible ClassCastException in HAEventWrapper during concurrent client
> registration and queue GII
> -------------------------------------------------------------------------------------------------
>
> Key: GEODE-6842
> URL: https://issues.apache.org/jira/browse/GEODE-6842
> Project: Geode
> Issue Type: Bug
> Components: client queues, client/server
> Affects Versions: 1.10.0
> Reporter: Ryan McMahon
> Assignee: Ryan McMahon
> Priority: Major
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> It is possible for a ClassCastException to be thrown if a client is
> registering interest/CQ concurrently while a queue GII is being performed.
> The issue is that the queued event (HAEventWrapper) can be mutated by the
> client registration logic while it is in another client's queue, so if a GII
> occurs it could be serialized while being mutated. Specifically, the
> CqNameToOpHashMap was shown to throw the exception on the deserialization
> side, because of a map size/entries mismatch on the serialization side caused
> by the race described above.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)