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/25 15:38:06 UTC
[geode] branch develop updated: GEODE-5783: have a single source
for ThreadFactory
This is an automated email from the ASF dual-hosted git repository.
bschuchardt pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new dab891b GEODE-5783: have a single source for ThreadFactory
dab891b is described below
commit dab891b621eafde3dcf7608dcf38f0c0b17475c2
Author: Bruce Schuchardt <bs...@pivotal.io>
AuthorDate: Thu Oct 25 08:37:22 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 cd73069..362d4f1 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
@@ -2286,7 +2286,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);