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

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

echobravopapa commented on a change in pull request #5870:
URL: https://github.com/apache/geode/pull/5870#discussion_r551650129



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueue.java
##########
@@ -255,23 +247,18 @@ public void destroy() {
   }
 
   @Override
-  public boolean put(Object event) throws CacheException {
-    lock.writeLock().lock();
-    try {
-      GatewaySenderEventImpl eventImpl = (GatewaySenderEventImpl) event;
-      final Region r = eventImpl.getRegion();
-      final boolean isPDXRegion =
-          (r instanceof DistributedRegion && 
r.getName().equals(PeerTypeRegistration.REGION_NAME));
-      final boolean isWbcl =
-          
this.regionName.startsWith(AsyncEventQueueImpl.ASYNC_EVENT_QUEUE_PREFIX);
-      if (!(isPDXRegion && isWbcl)) {
-        putAndGetKey(event);
-        return true;
-      }
-      return false;
-    } finally {
-      lock.writeLock().unlock();
+  public synchronized boolean put(Object event) throws CacheException {

Review comment:
       I didn't see any code changes for usage of this method...




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> SerialGatewaySenderQueue concurrency is poorly implemented
> ----------------------------------------------------------
>
>                 Key: GEODE-5922
>                 URL: https://issues.apache.org/jira/browse/GEODE-5922
>             Project: Geode
>          Issue Type: Improvement
>          Components: wan
>            Reporter: Bruce J Schuchardt
>            Assignee: Bruce J Schuchardt
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.8.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> This class uses synchronization on the queue to limit access to one put at a 
> time.  Synchronization isn't a fair locking mechanism so threads can be 
> blocked trying to add events to the queue while other more recent events get 
> the lock and insert their events.  This causes inconsistent latency which 
> I've observed being as long as 30 seconds, causing client connections to be 
> shut down by the ClientHealthMonitor.



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

Reply via email to