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

ASF GitHub Bot commented on GEODE-4062:
---------------------------------------

jhuynh1 commented on a change in pull request #1139: Feature/GEODE-4062:clear 
method implementation for ParallelGatewaySender queue
URL: https://github.com/apache/geode/pull/1139#discussion_r155823824
 
 

 ##########
 File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
 ##########
 @@ -1781,4 +1784,43 @@ ParallelGatewaySenderQueueMetaRegion 
newMetataRegion(InternalCache cache, final
       return meta;
     }
   }
+
+  public void clearQueue() {
+
+    this.sender.pause();// it wil take internal read-write-lock
+    try {
+      for (PartitionedRegion prQ : this.userRegionNameToshadowPRMap.values()) {
+        clearPartitionedRegion((PartitionedRegion) prQ);
+      }
+    } finally {
+      if (this.sender.isPaused())
 
 Review comment:
   So you are saying that no one else can unpause it due to holding the lock.  
So we can remove the check to see if sender is paused?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> clear method implementation for ParallelGatewaySender class
> -----------------------------------------------------------
>
>                 Key: GEODE-4062
>                 URL: https://issues.apache.org/jira/browse/GEODE-4062
>             Project: Geode
>          Issue Type: Bug
>          Components: core
>            Reporter: dinesh ak
>
> clear function is missing for ParallelGatewaySender.
> ParallelGatewaySender clear functionality is missing to clear the queue.
> why need: when receiver stuck . sender having lots of backlog in queue .
> we need clear method implementation which clear this queue.
> future use : we will create a gfsh command to clear the queue using this call.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to