tkalkirill commented on code in PR #4623: URL: https://github.com/apache/ignite-3/pull/4623#discussion_r1818954934
########## modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageCompactionTriggerConfiguration.java: ########## @@ -0,0 +1,130 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.metastorage.impl; + +import static org.apache.ignite.internal.util.CompletableFutures.nullCompletedFuture; + +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; +import org.apache.ignite.internal.configuration.SystemDistributedConfiguration; +import org.apache.ignite.internal.configuration.SystemDistributedView; +import org.apache.ignite.internal.configuration.SystemPropertyView; +import org.apache.ignite.internal.logger.IgniteLogger; +import org.apache.ignite.internal.logger.Loggers; +import org.jetbrains.annotations.Nullable; + +/** Configuration for metastorage compaction triggering based on distributed system properties. */ +public class MetaStorageCompactionTriggerConfiguration { + private static final IgniteLogger LOG = Loggers.forClass(MetaStorageCompactionTriggerConfiguration.class); + + /** + * System property that defines compaction start interval (in milliseconds). + * + * <p>Default value is {@link #INTERVAL_DEFAULT_VALUE}.</p> + */ + public static final String INTERVAL_SYSTEM_PROPERTY_NAME = "metastorageCompactionInterval"; + + /** + * System property that defines compaction data availability time (in milliseconds). + * + * <p>Default value is {@link #DATA_AVAILABILITY_TIME_DEFAULT_VALUE}.</p> + */ + public static final String DATA_AVAILABILITY_TIME_SYSTEM_PROPERTY_NAME = "metastorageCompactionDataAvailabilityTime"; + + /** Default value for the {@link #INTERVAL_SYSTEM_PROPERTY_NAME}. */ + // TODO: IGNITE-23280 Make default 1 minute + public static final long INTERVAL_DEFAULT_VALUE = Long.MAX_VALUE; + + /** Default value for the {@link #DATA_AVAILABILITY_TIME_SYSTEM_PROPERTY_NAME}. */ + // TODO: IGNITE-23280 Make default 1 hour Review Comment: In my opinion, a lot of garbage can accumulate in the metastorage during this time. Why do you think that the repair can take more than an hour? Why not more than a day? The meaning of this property was put on the PDS and no one left a comment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org