You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sk...@apache.org on 2022/08/02 14:19:29 UTC

[ignite-3] branch main updated: IGNITE-16559 A log level was changed for event when a leader refreshing is failed with timeout exception. #970

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

sk0x50 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 0f8685c89 IGNITE-16559 A log level was changed for event when a leader refreshing is failed with timeout exception. #970
0f8685c89 is described below

commit 0f8685c89758d23f2783fa74dbc06bda1fe8b744
Author: Sergey Uttsel <ut...@gmail.com>
AuthorDate: Tue Aug 2 17:18:59 2022 +0300

    IGNITE-16559 A log level was changed for event when a leader refreshing is failed with timeout exception. #970
    
    Signed-off-by: Slava Koptilin <sl...@gmail.com>
---
 .../ignite/raft/jraft/rpc/impl/RaftGroupServiceImpl.java   | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/RaftGroupServiceImpl.java b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/RaftGroupServiceImpl.java
index bded68750..fc9ed2b9d 100644
--- a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/RaftGroupServiceImpl.java
+++ b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/RaftGroupServiceImpl.java
@@ -176,9 +176,17 @@ public class RaftGroupServiceImpl implements RaftGroupService {
             return CompletableFuture.completedFuture(service);
 
         return service.refreshLeader().handle((unused, throwable) -> {
-            if (throwable != null)
-                LOG.error("Failed to refresh a leader [groupId={}]", throwable, groupId);
-
+            if (throwable != null) {
+                if (throwable.getCause() instanceof TimeoutException) {
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug("Failed to refresh a leader [groupId={}]", groupId);
+                    }
+                } else {
+                    if (LOG.isWarnEnabled()) {
+                        LOG.warn("Failed to refresh a leader [groupId={}]", throwable, groupId);
+                    }
+                }
+            }
             return service;
         });
     }