Skip to content

Commit 021c7cc

Browse files
committed
rename
1 parent 26e4bf0 commit 021c7cc

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1728,7 +1728,12 @@ public TSStatus setConfiguration(TSetConfigurationReq req) {
17281728
} else {
17291729
String msg =
17301730
"Unable to find the configuration file. Some modifications are made only in memory.";
1731-
tsStatus = RpcUtils.getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR, msg);
1731+
try {
1732+
ConfigNodeDescriptor.getInstance().loadHotModifiedProps(properties);
1733+
tsStatus = RpcUtils.getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR, msg);
1734+
} catch (Exception e) {
1735+
tsStatus = RpcUtils.getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR, e.getMessage());
1736+
}
17321737
LOGGER.warn(msg);
17331738
}
17341739
if (currentNodeId == req.getNodeId()) {

iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,7 @@ tier_ttl_in_ms=-1
12881288
####################
12891289
### Compaction Configurations
12901290
####################
1291+
12911292
# sequence space compaction: only compact the sequence files
12921293
# effectiveMode: hot_reload
12931294
# Datatype: boolean
@@ -1598,6 +1599,7 @@ region_migration_speed_limit_bytes_per_second = 50331648
15981599
####################
15991600
### Blob Allocator Configuration
16001601
####################
1602+
16011603
# Whether to enable binary allocator.
16021604
# For scenarios where large binary streams cause severe GC, enabling this parameter significantly improves performance.
16031605
# effectiveMode: hot_reload
@@ -1974,6 +1976,7 @@ data_region_ratis_periodic_snapshot_interval=86400
19741976
####################
19751977
### IoTConsensusV2 Configuration
19761978
####################
1979+
19771980
# Default event buffer size for connector and receiver in iot consensus v2
19781981
# effectiveMode: restart
19791982
# DataType: int

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ public static Map<String, DefaultConfigurationItem> getConfigurationItemsFromTem
351351
.getResourceAsStream(CommonConfig.SYSTEM_CONFIG_TEMPLATE_NAME);
352352
InputStreamReader isr = new InputStreamReader(inputStream);
353353
BufferedReader reader = new BufferedReader(isr)) {
354+
List<String> independentLines = new ArrayList<>();
354355
EffectiveModeType effectiveMode = null;
355356
StringBuilder description = new StringBuilder();
356357
String line;
@@ -359,34 +360,36 @@ public static Map<String, DefaultConfigurationItem> getConfigurationItemsFromTem
359360
if (line.isEmpty()) {
360361
description = new StringBuilder();
361362
effectiveMode = null;
363+
independentLines.clear();
362364
continue;
363365
}
364366
if (line.startsWith("#")) {
365367
String comment = line.substring(1).trim();
366368
if (comment.isEmpty()) {
367369
continue;
368370
}
369-
boolean needSeperateLine = false;
370371
if (comment.startsWith(EFFECTIVE_MODE_PREFIX)) {
371372
effectiveMode =
372373
EffectiveModeType.getEffectiveMode(
373374
comment.substring(EFFECTIVE_MODE_PREFIX.length()).trim());
374-
needSeperateLine = true;
375+
independentLines.add(comment);
376+
continue;
375377
} else if (comment.startsWith(DATATYPE_PREFIX)) {
376-
needSeperateLine = true;
378+
independentLines.add(comment);
379+
continue;
377380
} else {
378381
description.append(" ");
379382
}
380383
if (withDesc) {
381384
description.append(comment);
382-
if (needSeperateLine) {
383-
description.append(lineSeparator);
384-
}
385385
}
386386
} else {
387387
int equalsIndex = line.indexOf('=');
388388
String key = line.substring(0, equalsIndex).trim();
389389
String value = line.substring(equalsIndex + 1).trim();
390+
for (String independentLine : independentLines) {
391+
description.append(lineSeparator).append(independentLine);
392+
}
390393
items.put(
391394
key,
392395
new DefaultConfigurationItem(

0 commit comments

Comments
 (0)