[ 
https://issues.apache.org/jira/browse/GEODE-5420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16565773#comment-16565773
 ] 

ASF subversion and git services commented on GEODE-5420:
--------------------------------------------------------

Commit 103b467ab6205f6c9d180d5ad28705ce47c7b5bb in geode's branch 
refs/heads/develop from [~mcmellawatt]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=103b467 ]

GEODE-5420: Protect events in HAContainer from premature modification

- Updated putInProgress boolean in HAWrapper to a counter to prevent 
prematurely setting ClientUpdateMessage to null when events are temporarily 
queued during a GII or message dispatcher initialization
- decAndRemoveFromHAContainer only removes when putInProgress counter and ref 
count are 0
- Refactored putEventInHARegion/putConditionallyInHAContainer to prevent 
overwriting an existing entry in the HAContainer.  Also reduces simplifies the 
code and reduces duplicated logic.
- Wrote missing basic HARegionQueue unit/integration tests, and an integration 
test to capture setting the ClientUpdateMessage property on HAEventWrapper to 
null prematurely
- Added new event tracing messages at debug logging level to help track similar 
issues in the future

Co-authored-by: Ryan McMahon <rmcma...@pivotal.io>
Co-authored-by: Lynn Hughes-Godfrey <lhughesgodf...@pivotal.io>


> Protect events in HAContainer from being removed prematurely
> ------------------------------------------------------------
>
>                 Key: GEODE-5420
>                 URL: https://issues.apache.org/jira/browse/GEODE-5420
>             Project: Geode
>          Issue Type: Bug
>          Components: client queues
>    Affects Versions: 1.8.0
>            Reporter: Ryan McMahon
>            Assignee: Ryan McMahon
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> This can occur when:
> 1) Events are added to queuedEvents during message dispatcher initialization
> 2) Events are added to giiQueue while serving initial image to peer
> We have seen this issue when QRM messages are being processed after becoming 
> primary.  This causes the event to be removed prematurely from the 
> HAContainer, and then the wrapper is in a bad state (null client update 
> message) when we try to replace the event.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to