This is an automated email from the ASF dual-hosted git repository.
yong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 948d94fb65 Dont validate CompactionInterval when compaction is
disabled (#3664)
948d94fb65 is described below
commit 948d94fb652d33e714eea39820a8fbf64080b261
Author: gaozhangmin <[email protected]>
AuthorDate: Thu Nov 24 10:51:03 2022 +0800
Dont validate CompactionInterval when compaction is disabled (#3664)
### Motivation
Currently, We cannot disable minorCompaction and majorCompaction by setting
interval to -1, with `gcWaitTime` is enabled.
### Changes
Don't validate CompactionInterval if compaction is disabled
---
.../src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java
index 05a4dec907..1da07d526f 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java
@@ -3164,10 +3164,10 @@ public class ServerConfiguration extends
AbstractConfiguration<ServerConfigurati
throw new ConfigurationException("For persisiting explicitLac,
journalFormatVersionToWrite should be >= 6"
+ "and FileInfoFormatVersionToWrite should be >= 1");
}
- if (getMinorCompactionInterval() * SECOND < getGcWaitTime()) {
+ if (getMinorCompactionInterval() > 0 && getMinorCompactionInterval() *
SECOND < getGcWaitTime()) {
throw new ConfigurationException("minorCompactionInterval should
be >= gcWaitTime.");
}
- if (getMajorCompactionInterval() * SECOND < getGcWaitTime()) {
+ if (getMajorCompactionInterval() > 0 && getMajorCompactionInterval() *
SECOND < getGcWaitTime()) {
throw new ConfigurationException("majorCompactionInterval should
be >= gcWaitTime.");
}
}