Skip to content

Commit b48b46e

Browse files
authored
Disabled the repeatable pipe log when the receiver is down (#16963) (#16974)
1 parent ffcc74e commit b48b46e

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
@@ -279,6 +279,7 @@ public class CommonConfig {
279279
Math.max(32, Runtime.getRuntime().availableProcessors() * 2);
280280
private int pipeAsyncConnectorMaxTsFileClientNumber =
281281
Math.max(16, Runtime.getRuntime().availableProcessors());
282+
private boolean printLogWhenEncounterException = false;
282283

283284
private double pipeSendTsFileRateLimitBytesPerSecond = 32 * MB;
284285
private double pipeAllSinksRateLimitBytesPerSecond = -1;
@@ -1199,6 +1200,18 @@ public void setPipeAsyncConnectorMaxTsFileClientNumber(
11991200
"pipeAsyncConnectorMaxClientNumber is set to {}.", pipeAsyncConnectorMaxTsFileClientNumber);
12001201
}
12011202

1203+
public boolean isPrintLogWhenEncounterException() {
1204+
return printLogWhenEncounterException;
1205+
}
1206+
1207+
public void setPrintLogWhenEncounterException(boolean printLogWhenEncounterException) {
1208+
if (this.printLogWhenEncounterException == printLogWhenEncounterException) {
1209+
return;
1210+
}
1211+
this.printLogWhenEncounterException = printLogWhenEncounterException;
1212+
logger.info("printLogWhenEncounterException is set to {}.", printLogWhenEncounterException);
1213+
}
1214+
12021215
public boolean isSeperatedPipeHeartbeatEnabled() {
12031216
return isSeperatedPipeHeartbeatEnabled;
12041217
}

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
@@ -609,6 +609,11 @@ public static void loadPipeExternalConfig(
609609
if (value != null) {
610610
config.setPipeAllSinksRateLimitBytesPerSecond(Double.parseDouble(value));
611611
}
612+
613+
value = parserPipeConfig(properties, "print_log_when_encounter_exception", isHotModify);
614+
if (value != null) {
615+
config.setPrintLogWhenEncounterException(Boolean.parseBoolean(value));
616+
}
612617
}
613618

614619
private static String parserPipeConfig(

0 commit comments

Comments
 (0)