You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Darrel Schneider (JIRA)" <ji...@apache.org> on 2019/05/22 19:50:00 UTC
[jira] [Created] (GEODE-6794) Returning a client connection to the
pool always calls notifyAll
Darrel Schneider created GEODE-6794:
---------------------------------------
Summary: Returning a client connection to the pool always calls notifyAll
Key: GEODE-6794
URL: https://issues.apache.org/jira/browse/GEODE-6794
Project: Geode
Issue Type: Improvement
Components: client/server
Reporter: Darrel Schneider
The PooledConnection passivate method is called every time a client op completes and it is returning its connection to the pool.
passivate almost always calls notifyAll. But no other thread will be waiting for this notify unless the boolean "waitingToSwitch" is true. This notifyAll calls shows up as a hotspot in profiling. But when I got rid of it it didn't make any difference in client operation throughput.
Here is the change that can be made to get rid of the notifyAll calls:
{noformat}
--- a/geode-core/src/main/java/org/apache/geode/cache/client/internal/pooling/PooledConnection.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/client/internal/pooling/PooledConnection.java
@@ -157,7 +157,9 @@ public class PooledConnection implements Connection {
throw new InternalGemFireException("Connection not active");
}
this.active = false;
- notifyAll();
+ if (this.waitingToSwitch) {
+ notifyAll();
+ }
if (accessed) {
this.lastAccessed = now; // do this while synchronized
}
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)