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

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

Commit ccb032e0feaf04fe5e39dfc27f2888ab72fedb82 in geode's branch 
refs/heads/develop from Nabarun Nag
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=ccb032e ]

GEODE-8745: Handle race between batch destroy msg and sec event. (#5821)

  
   * Primary serial sender receives an event but the sender is not running yet. 
Hence it has to drop the event.
   * Primary has to inform the secondary to remove the event from the 
unprocessedEventsMap.
   * It has to do that because the event is dropped and the cache listener on 
the secondary queue will not be triggered to remove it.
   * Hence, the primary sends BatchDestroyOperation to the secondary with the 
tail key set to -1 to trigger removal from unprocessedEventMap.
   * There is a race in which the BatchDestroyOperation arrives before the 
secondary event.
   * In this case the event is never removed from the unprocessedEventsMap.
   * In this fix, if this happens the event ID is placed in the 
unprocessedTokensMap.
   * So, when the secondary event arrives, it checks the unprocessedTokensMap 
and then realizes that the primary has seen the event and there is no need to 
place the event in the unprocessedEventsMap.



> Closing the region backing the queue when the serial gateway sender is 
> stopped.
> -------------------------------------------------------------------------------
>
>                 Key: GEODE-8745
>                 URL: https://issues.apache.org/jira/browse/GEODE-8745
>             Project: Geode
>          Issue Type: Task
>          Components: wan
>            Reporter: Nabarun Nag
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.14.0
>
>
> In the commit for GEODE-7458, when the sender is stopped, the region backing 
> the queues are no more closed, but just remove the cache listeners.
> This is causing a problem, as the regions continue to exist, it keeps on 
> storing entry events and hence the queue size never gets to zero.
> Also, as the region exists but before attaching the cache listener when 
> restarting the sender leads to entries being never removed from the 
> unprocessed event map.
>  
> As mention in the PR for GEODE-7458 - "This option is only applicable for 
> Gateway Senders with enabled persistence."
> Hence believe that it is ok to close the region as the disk files will still 
> be maintained. so when we restart the values can be obtained back from the 
> disk stores.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to