sashapolo commented on code in PR #3085:
URL: https://github.com/apache/ignite-3/pull/3085#discussion_r1464464507


##########
modules/workers/README.md:
##########
@@ -0,0 +1,2 @@
+# Ignite workers module
+This module provides implementation of workers used internally by Ignite.

Review Comment:
   I guess we need to give a definition of what a "worker" is. Is it at thread?



##########
modules/workers/src/main/java/org/apache/ignite/internal/worker/configuration/CriticalWorkersConfigurationSchema.java:
##########
@@ -0,0 +1,54 @@
+/*
+ * 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.worker.configuration;
+
+import org.apache.ignite.configuration.annotation.ConfigurationRoot;
+import org.apache.ignite.configuration.annotation.ConfigurationType;
+import org.apache.ignite.configuration.annotation.Value;
+import org.apache.ignite.configuration.validation.Range;
+
+/**
+ * Configuration for critical workers handling.
+ */
+@ConfigurationRoot(rootName = "criticalWorkers", type = 
ConfigurationType.LOCAL)
+public class CriticalWorkersConfigurationSchema {
+    /**
+     * Interval between liveness checks (ms) performed by critical workers 
infrastructure.

Review Comment:
   ```suggestion
        * Interval between liveness checks (ms) performed by the critical 
workers infrastructure.
   ```



##########
modules/workers/src/main/java/org/apache/ignite/internal/worker/configuration/CriticalWorkersConfigurationSchema.java:
##########
@@ -0,0 +1,54 @@
+/*
+ * 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.worker.configuration;
+
+import org.apache.ignite.configuration.annotation.ConfigurationRoot;
+import org.apache.ignite.configuration.annotation.ConfigurationType;
+import org.apache.ignite.configuration.annotation.Value;
+import org.apache.ignite.configuration.validation.Range;
+
+/**
+ * Configuration for critical workers handling.
+ */
+@ConfigurationRoot(rootName = "criticalWorkers", type = 
ConfigurationType.LOCAL)
+public class CriticalWorkersConfigurationSchema {
+    /**
+     * Interval between liveness checks (ms) performed by critical workers 
infrastructure.
+     *
+     * <p>Should not be greater than a half of {@link #maxAllowedLag}.
+     */
+    @Value(hasDefault = true)
+    @Range(min = 1)
+    public long livenessCheckInterval = 200;
+
+    /**
+     * Maximum allowed delay of the last heartbeat from current time; if it's 
exceeded, the critical worker is considered to be blocked.
+     *
+     * <p>Should exceed {@link #livenessCheckInterval} at least twice.

Review Comment:
   This sentence sounds strange to me, maybe it should be rephrased to 
something like: `Should be at least twice as large as the {@link 
#livenessCheckInterval}`



##########
modules/raft/src/integrationTest/java/org/apache/ignite/internal/raft/ItTruncateSuffixAndRestartTest.java:
##########
@@ -60,7 +60,7 @@
 import org.apache.ignite.internal.testframework.BaseIgniteAbstractTest;
 import org.apache.ignite.internal.testframework.WorkDirectory;
 import org.apache.ignite.internal.testframework.WorkDirectoryExtension;
-import org.apache.ignite.internal.worker.NoOpCriticalWorkerRegistry;
+import org.apache.ignite.internal.worker.fixtures.NoOpCriticalWorkerRegistry;

Review Comment:
   Do we really need the "fixtures" package?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to