rpuch commented on code in PR #4623:
URL: https://github.com/apache/ignite-3/pull/4623#discussion_r1820885387


##########
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:
   A network partition that is a couple of hours long is a lot more probable 
than a network partition of 1 day long. By setting this to 1 day, we solve a 
lot of possible repair problems, and we cannot solve them all as we have 
compaction.
   
   > The meaning of this property was put on the PDS and no one left a comment.
   At that time no one thought about this, now we have a scenario.
   
   Let's not make this a blocker for merging this, but let's file a separate 
issue if you don't want to change it in this PR.



-- 
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

Reply via email to