You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by aa...@apache.org on 2022/07/29 04:01:13 UTC

[rocketmq-clients] branch master updated: Reduce the telemetry timeout to avoid the bug in JDK8 + macOS (#89)

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

aaronai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git


The following commit(s) were added to refs/heads/master by this push:
     new 0460669  Reduce the telemetry timeout to avoid the bug in JDK8 + macOS (#89)
0460669 is described below

commit 046066918aabb320654bfda4d0e717a9271a6966
Author: Aaron Ai <ya...@gmail.com>
AuthorDate: Fri Jul 29 12:01:08 2022 +0800

    Reduce the telemetry timeout to avoid the bug in JDK8 + macOS (#89)
---
 java/client-shade/src/main/resources/rocketmq.logback.xml           | 2 +-
 .../main/java/org/apache/rocketmq/client/java/impl/ClientImpl.java  | 6 +++++-
 java/client/src/main/resources/logback.xml                          | 2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/java/client-shade/src/main/resources/rocketmq.logback.xml b/java/client-shade/src/main/resources/rocketmq.logback.xml
index ff398f3..b0d3865 100644
--- a/java/client-shade/src/main/resources/rocketmq.logback.xml
+++ b/java/client-shade/src/main/resources/rocketmq.logback.xml
@@ -48,5 +48,5 @@
         <appender-ref ref="DefaultAppender" additivity="false"/>
     </root>
     <!-- ref: https://github.com/grpc/grpc-java/issues/3033 -->
-    <logger name="org.apache.rocketmq.shaded.io.grpc" level="${rocketmq.grpc.log.level:-error}"/>
+    <!-- <logger name="org.apache.rocketmq.shaded.io.grpc" level="warn"/> -->
 </configuration>
\ No newline at end of file
diff --git a/java/client/src/main/java/org/apache/rocketmq/client/java/impl/ClientImpl.java b/java/client/src/main/java/org/apache/rocketmq/client/java/impl/ClientImpl.java
index bc2f68f..2ee5e23 100644
--- a/java/client/src/main/java/org/apache/rocketmq/client/java/impl/ClientImpl.java
+++ b/java/client/src/main/java/org/apache/rocketmq/client/java/impl/ClientImpl.java
@@ -97,7 +97,11 @@ import org.slf4j.LoggerFactory;
 public abstract class ClientImpl extends AbstractIdleService implements Client, ClientSessionHandler,
     MessageInterceptor {
     private static final Logger LOGGER = LoggerFactory.getLogger(ClientImpl.class);
-    private static final Duration TELEMETRY_TIMEOUT = Duration.ofDays(102 * 365);
+    /**
+     * The telemetry timeout should not be too long, otherwise
+     * <a href="https://github.com/grpc/grpc-java/issues/7351">this issue</a> may be triggered in JDK8 + macOS.
+     */
+    private static final Duration TELEMETRY_TIMEOUT = Duration.ofDays(60 * 365);
 
     protected final ClientManager clientManager;
     protected final ClientConfiguration clientConfiguration;
diff --git a/java/client/src/main/resources/logback.xml b/java/client/src/main/resources/logback.xml
index 62d40db..9823c00 100644
--- a/java/client/src/main/resources/logback.xml
+++ b/java/client/src/main/resources/logback.xml
@@ -48,5 +48,5 @@
         <appender-ref ref="DefaultAppender" additivity="false"/>
     </root>
     <!-- ref: https://github.com/grpc/grpc-java/issues/3033 -->
-     <logger name="io.grpc" level="${rocketmq.grpc.log.level:-error}"/>
+    <!-- <logger name="io.grpc" level="warn"/> -->
 </configuration>
\ No newline at end of file