Skip to content

Commit fa7bfef

Browse files
Hot-reload PipePeriodicalLogReducer settings on ConfigNode
Apply pipe log reducer cache updates during ConfigNode configuration reload so pipe_periodical_log_min_interval_seconds and pipe_logger_cache_max_size_in_bytes take effect without restart. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 64c4f42 commit fa7bfef

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import org.apache.iotdb.commons.conf.IoTDBConstant;
2626
import org.apache.iotdb.commons.conf.TrimProperties;
2727
import org.apache.iotdb.commons.exception.BadNodeUrlException;
28+
import org.apache.iotdb.commons.pipe.config.PipeDescriptor;
29+
import org.apache.iotdb.commons.pipe.resource.log.PipePeriodicalLogReducer;
2830
import org.apache.iotdb.commons.schema.SchemaConstant;
2931
import org.apache.iotdb.commons.utils.NodeUrlUtils;
3032
import org.apache.iotdb.confignode.i18n.ConfigNodeMessages;
@@ -811,12 +813,18 @@ public boolean isSeedConfigNode() {
811813
}
812814
}
813815

814-
public void loadHotModifiedProps(TrimProperties properties) {
816+
public void loadHotModifiedProps(TrimProperties properties) throws IOException {
815817
ConfigurationFileUtils.updateAppliedProperties(properties, true);
816818
Optional.ofNullable(properties.getProperty(IoTDBConstant.CLUSTER_NAME))
817819
.ifPresent(conf::setClusterName);
818820
Optional.ofNullable(properties.getProperty("enable_topology_probing"))
819821
.ifPresent(v -> conf.setEnableTopologyProbing(Boolean.parseBoolean(v)));
822+
loadPipeHotModifiedProp(properties);
823+
}
824+
825+
private void loadPipeHotModifiedProp(TrimProperties properties) throws IOException {
826+
PipeDescriptor.loadPipeProps(commonDescriptor.getConfig(), properties, true);
827+
PipePeriodicalLogReducer.update();
820828
}
821829

822830
public static ConfigNodeDescriptor getInstance() {

0 commit comments

Comments
 (0)