You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/02/16 21:58:14 UTC

[GitHub] [geode] bschuchardt commented on a change in pull request #6038: GEODE-8947: Use waiting thread pool only in limited senario.

bschuchardt commented on a change in pull request #6038:
URL: https://github.com/apache/geode/pull/6038#discussion_r577167100



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/tx/RemoteOperationMessage.java
##########
@@ -177,7 +179,28 @@ public void process(final ClusterDistributionManager dm) {
       sendReply(getSender(), this.processorId, dm, replyException, null, 0);
       return;
     }
-    dm.getExecutors().getWaitingThreadPool().execute(() -> doRemoteOperation(dm, cache));
+
+    String conserveSockets = getConserveSocketsSetting(dm);
+    if (conserveSockets != null && conserveSockets.equals("false")) {
+      // reply inline for CONSERVE_SOCKETS == false case.
+      doRemoteOperation(dm, cache);
+      return;
+    }
+
+    if (isTransactional()) {
+      dm.getExecutors().getWaitingThreadPool().execute(() -> doRemoteOperation(dm, cache));
+    } else {
+      // reply inline for non-transactional case.
+      doRemoteOperation(dm, cache);
+    }
+  }
+
+  String getConserveSocketsSetting(ClusterDistributionManager dm) {
+    return dm.getSystem().getProperties().getProperty(CONSERVE_SOCKETS);

Review comment:
       I agree with Donal, though this isn't a System Property but a DistributionConfig converted into properties.  It would be better to get the config and query it.  Creating a Properties object isn't all that cheap.




----------------------------------------------------------------
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:
users@infra.apache.org