Skip to content

Commit d62e63c

Browse files
LiebingYuLiebing
andauthored
[server] Checks value of LOG_SEGMENT_FILE_SIZE (#1504)
Co-authored-by: Liebing <[email protected]>
1 parent 0cba53b commit d62e63c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fluss-server/src/main/java/com/alibaba/fluss/server/tablet/TabletServer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,13 @@ private static void validateConfigs(Configuration conf) {
457457
throw new IllegalConfigurationException(
458458
String.format("Configuration %s must be set.", ConfigOptions.REMOTE_DATA_DIR));
459459
}
460+
461+
if (conf.get(ConfigOptions.LOG_SEGMENT_FILE_SIZE).getBytes() > Integer.MAX_VALUE) {
462+
throw new IllegalConfigurationException(
463+
String.format(
464+
"Invalid configuration for %s, it must be less than or equal %d bytes.",
465+
ConfigOptions.LOG_SEGMENT_FILE_SIZE.key(), Integer.MAX_VALUE));
466+
}
460467
}
461468

462469
@VisibleForTesting

0 commit comments

Comments
 (0)