Skip to content

Commit 790bc26

Browse files
authored
IoTV2: Improve create consensus log based on product scenario apache#14306
1 parent cfc5ef3 commit 790bc26

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/PipeConsensusServerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ private List<Peer> createConsensusPipes(Set<Peer> peers) {
221221
"{}: cannot create consensus pipe between {} and {}",
222222
e.getMessage(),
223223
thisNode,
224-
peer);
224+
peer,
225+
e);
225226
return false;
226227
}
227228
})

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/ConsensusPipeDataNodeDispatcher.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void createPipe(
6767
throw new PipeException(status.getMessage());
6868
}
6969
} catch (Exception e) {
70-
LOGGER.warn("Failed to create consensus pipe-{}", pipeName);
70+
LOGGER.warn("Failed to create consensus pipe-{}", pipeName, e);
7171
throw new PipeException("Failed to create consensus pipe", e);
7272
}
7373
}
@@ -82,7 +82,7 @@ public void startPipe(String pipeName) throws Exception {
8282
throw new PipeException(status.getMessage());
8383
}
8484
} catch (Exception e) {
85-
LOGGER.warn("Failed to start consensus pipe-{}", pipeName);
85+
LOGGER.warn("Failed to start consensus pipe-{}", pipeName, e);
8686
throw new PipeException("Failed to start consensus pipe", e);
8787
}
8888
}
@@ -97,7 +97,7 @@ public void stopPipe(String pipeName) throws Exception {
9797
throw new PipeException(status.getMessage());
9898
}
9999
} catch (Exception e) {
100-
LOGGER.warn("Failed to stop consensus pipe-{}", pipeName);
100+
LOGGER.warn("Failed to stop consensus pipe-{}", pipeName, e);
101101
throw new PipeException("Failed to stop consensus pipe", e);
102102
}
103103
}
@@ -114,7 +114,7 @@ public void dropPipe(ConsensusPipeName pipeName) throws Exception {
114114
throw new PipeException(status.getMessage());
115115
}
116116
} catch (Exception e) {
117-
LOGGER.warn("Failed to drop consensus pipe-{}", pipeName);
117+
LOGGER.warn("Failed to drop consensus pipe-{}", pipeName, e);
118118
throw new PipeException("Failed to drop consensus pipe", e);
119119
}
120120
// Release corresponding receiver's resource

0 commit comments

Comments
 (0)