You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2018/10/24 20:35:43 UTC

[geode] branch feature/GEODE-5783b created (now aaf1ec3)

This is an automated email from the ASF dual-hosted git repository.

bschuchardt pushed a change to branch feature/GEODE-5783b
in repository https://gitbox.apache.org/repos/asf/geode.git.


      at aaf1ec3  GEODE-5783: have a single source for ThreadFactory

This branch includes the following new commits:

     new aaf1ec3  GEODE-5783: have a single source for ThreadFactory

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[geode] 01/01: GEODE-5783: have a single source for ThreadFactory

Posted by bs...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bschuchardt pushed a commit to branch feature/GEODE-5783b
in repository https://gitbox.apache.org/repos/asf/geode.git

commit aaf1ec318ca87ed5df882885774cced6401edaa7
Author: Bruce Schuchardt <bs...@pivotal.io>
AuthorDate: Wed Oct 24 13:33:35 2018 -0700

    GEODE-5783: have a single source for ThreadFactory
    
    Use the keepalive parameter when initializing the thread factory.
    
    I also made some logging changes while debugging the problems this
    missing setting was causing.
---
 .../org/apache/geode/distributed/internal/ReplyMessage.java    | 10 ++++++----
 .../org/apache/geode/internal/cache/PartitionedRegion.java     |  2 +-
 .../geode/internal/cache/tier/sockets/CacheClientProxy.java    |  4 +++-
 .../org/apache/geode/internal/logging/LoggingExecutors.java    |  3 ++-
 .../main/java/org/apache/geode/internal/tcp/Connection.java    |  2 +-
 5 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/ReplyMessage.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/ReplyMessage.java
index bc8812d..41f35fb 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/ReplyMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/ReplyMessage.java
@@ -21,6 +21,7 @@ import java.io.IOException;
 
 import org.apache.logging.log4j.Logger;
 
+import org.apache.geode.CancelException;
 import org.apache.geode.DataSerializer;
 import org.apache.geode.InvalidDeltaException;
 import org.apache.geode.cache.EntryNotFoundException;
@@ -97,12 +98,13 @@ public class ReplyMessage extends HighPriorityDistributionMessage {
       m.returnValueIsException = true;
     }
     if (exception != null && logger.isDebugEnabled()) {
-      if (exception.getCause() != null
-          && (exception.getCause() instanceof EntryNotFoundException)) {
+      Throwable cause = exception.getCause();
+      if (cause instanceof EntryNotFoundException) {
         logger.debug("Replying with entry-not-found: {}", exception.getCause().getMessage());
-      } else if (exception.getCause() != null
-          && (exception.getCause() instanceof ConcurrentCacheModificationException)) {
+      } else if (cause instanceof ConcurrentCacheModificationException) {
         logger.debug("Replying with concurrent-modification-exception");
+      } else if (cause instanceof CancelException) {
+        // no need to log this - it will show up in normal debug-level logs when the reply is sent
       } else {
         logger.debug("Replying with exception: " + m, exception);
       }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
index 5a669f1..9053b63 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
@@ -7079,7 +7079,7 @@ public class PartitionedRegion extends LocalRegion
       boolean callbackEvents) {
 
     if (logger.isDebugEnabled()) {
-      logger.debug("Destoying parallel queue region for senders: {}",
+      logger.debug("Destroying parallel queue region for senders: {}",
           this.getParallelGatewaySenderIds());
     }
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
index 7a8977d..b96eb53 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java
@@ -2309,7 +2309,9 @@ public class CacheClientProxy implements ClientSession {
             && InternalDistributedSystem.getAnyInstance().getConfig().getDeltaPropagation()
             && !(this._proxy.clientConflation == Handshake.CONFLATION_ON);
         if ((createDurableQueue || canHandleDelta) && logger.isDebugEnabled()) {
-          logger.debug("Creating a durable HA queue");
+          logger.debug("Creating a {} subscription queue for {}",
+              createDurableQueue ? "durable" : "non-durable",
+              proxy.getProxyID());
         }
         this._messageQueue = HARegionQueue.getHARegionQueueInstance(getProxy().getHARegionName(),
             getCache(), harq, HARegionQueue.BLOCKING_HA_QUEUE, createDurableQueue,
diff --git a/geode-core/src/main/java/org/apache/geode/internal/logging/LoggingExecutors.java b/geode-core/src/main/java/org/apache/geode/internal/logging/LoggingExecutors.java
index 6d9f644..5f206ae 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/logging/LoggingExecutors.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/logging/LoggingExecutors.java
@@ -171,7 +171,8 @@ public class LoggingExecutors {
     final BlockingQueue<Runnable> blockingQueue = new SynchronousQueue<>();
     ThreadFactory threadFactory =
         new LoggingThreadFactory(threadName, threadInitializer, commandWrapper);
-    return new ThreadPoolExecutor(corePoolSize, maximumPoolSize, 0, SECONDS, blockingQueue,
+    return new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveSeconds, SECONDS,
+        blockingQueue,
         threadFactory);
   }
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java b/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
index 3fd36c5..13fba79 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
@@ -1277,7 +1277,7 @@ public class Connection implements Runnable {
       }
     }
     if (logger.isDebugEnabled()) {
-      logger.debug("Connection: connected to {} with stub {}", remoteAddr, addr);
+      logger.debug("Connection: connected to {} with IP address {}", remoteAddr, addr);
     }
     try {
       getSocket().setTcpNoDelay(true);