Skip to content

Commit ad0416e

Browse files
authored
Disabled the repeatable pipe log when the receiver is down (#16963)
1 parent 9d9902f commit ad0416e

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ClientPoolFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ public GenericKeyedObjectPool<TEndPoint, AsyncPipeDataTransferServiceClient> cre
312312
conf.isPipeConnectorRPCThriftCompressionEnabled())
313313
.setSelectorNumOfAsyncClientManager(
314314
conf.getPipeAsyncConnectorSelectorNumber())
315+
.setPrintLogWhenEncounterException(conf.isPrintLogWhenEncounterException())
315316
.build(),
316317
ThreadName.PIPE_ASYNC_CONNECTOR_CLIENT_POOL.getName()),
317318
new ClientPoolProperty.Builder<AsyncPipeDataTransferServiceClient>()

iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ public class CommonConfig {
282282
Math.max(32, Runtime.getRuntime().availableProcessors() * 2);
283283
private int pipeAsyncConnectorMaxTsFileClientNumber =
284284
Math.max(16, Runtime.getRuntime().availableProcessors());
285+
private boolean printLogWhenEncounterException = false;
285286

286287
private double pipeSendTsFileRateLimitBytesPerSecond = 32 * MB;
287288
private double pipeAllSinksRateLimitBytesPerSecond = -1;
@@ -1256,6 +1257,18 @@ public void setPipeAsyncConnectorMaxTsFileClientNumber(
12561257
"pipeAsyncConnectorMaxClientNumber is set to {}.", pipeAsyncConnectorMaxTsFileClientNumber);
12571258
}
12581259

1260+
public boolean isPrintLogWhenEncounterException() {
1261+
return printLogWhenEncounterException;
1262+
}
1263+
1264+
public void setPrintLogWhenEncounterException(boolean printLogWhenEncounterException) {
1265+
if (this.printLogWhenEncounterException == printLogWhenEncounterException) {
1266+
return;
1267+
}
1268+
this.printLogWhenEncounterException = printLogWhenEncounterException;
1269+
logger.info("printLogWhenEncounterException is set to {}.", printLogWhenEncounterException);
1270+
}
1271+
12591272
public boolean isSeperatedPipeHeartbeatEnabled() {
12601273
return isSeperatedPipeHeartbeatEnabled;
12611274
}

iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/config/PipeDescriptor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,11 @@ public static void loadPipeExternalConfig(
608608
if (value != null) {
609609
config.setPipeAllSinksRateLimitBytesPerSecond(Double.parseDouble(value));
610610
}
611+
612+
value = parserPipeConfig(properties, "print_log_when_encounter_exception", isHotModify);
613+
if (value != null) {
614+
config.setPrintLogWhenEncounterException(Boolean.parseBoolean(value));
615+
}
611616
}
612617

613618
private static String parserPipeConfig(

0 commit comments

Comments
 (0)