You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "echonesis (via GitHub)" <gi...@apache.org> on 2026/10/21 17:41:57 UTC

[PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

echonesis opened a new pull request, #10989:
URL: https://github.com/apache/ozone/pull/10989

   ## What changes were proposed in this pull request?
   `MiniOzoneClusterProvider` creates clusters on a background thread and passes them to consumers through a bounded blocking queue. Previously, an `IOException` or `TimeoutException` during cluster creation terminated the background thread. The queue was then never refilled, causing every subsequent `provide()` call to wait for 100 seconds and fail with the misleading `Failed to obtain available cluster in time` message.
   
   This change passes both successful clusters and build failures through the existing bounded queue:
   - A failed build is surfaced immediately from the affected `provide()` call, with the original exception preserved as its cause.
   - The background create thread continues building clusters after a failure.
   - A partially created cluster is shut down before the failure is published.
   - Subsequent `provide()` calls can receive successfully created clusters.
   - Failed builds do not count toward the configured cluster limit.
   
   The queue capacity remains one and `put()` is blocking, providing natural backpressure when builds fail persistently. This prevents the create thread from processing failures in an unbounded tight loop without introducing a retry limit, backoff duration, or polling interval.
   
   The change limits the blast radius of an individual cluster startup failure. It does not attempt to address the underlying cause of slow cluster startup.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16120
   
   ## How was this patch tested?
   
   Local Test
   ```shell
   mvn -pl :ozone-mini-cluster test \
       -Dtest=TestMiniOzoneClusterProvider \
       -DskipShade -DskipRecon -DskipDocs
   ```
   
   GitHub Actions CI: https://github.com/echonesis/ozone/actions/runs/31478614848
   
   Generated-by: Codex (GPT-5)


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10989:
URL: https://github.com/apache/ozone/pull/10989#issuecomment-5593680709

   This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "echonesis (via GitHub)" <gi...@apache.org>.
echonesis commented on code in PR #10989:
URL: https://github.com/apache/ozone/pull/10989#discussion_r4344268397


##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterProvider.java:
##########
@@ -231,10 +250,21 @@ private Thread createClusters() {
     return t;
   }
 
+  private boolean addClusterResult(ClusterCreationResult result)
+      throws InterruptedException {

Review Comment:
   Thank you. 
   I removed the unnecessary wrappings. Each now fits on a single line within the 120-character limit.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "echonesis (via GitHub)" <gi...@apache.org>.
echonesis commented on code in PR #10989:
URL: https://github.com/apache/ozone/pull/10989#discussion_r4344273595


##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterProvider.java:
##########
@@ -215,14 +221,27 @@ private Thread createClusters() {
           cluster = builder.build();
           cluster.waitForClusterToBeReady();
           createdCount++;
-          clusters.put(cluster);
+          if (!addClusterResult(ClusterCreationResult.success(cluster))) {
+            cluster.shutdown();
+            break;
+          }
         } catch (InterruptedException e) {
           if (cluster != null) {
             cluster.shutdown();
           }
           break;
         } catch (IOException | TimeoutException e) {
-          throw new RuntimeException("Unable to build cluster", e);
+          LOG.warn("Unable to build cluster", e);

Review Comment:
   Thank you for the suggestion!
   Updated in the next commit.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "chihsuan (via GitHub)" <gi...@apache.org>.
chihsuan commented on code in PR #10989:
URL: https://github.com/apache/ozone/pull/10989#discussion_r3785455711


##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterProvider.java:
##########
@@ -215,14 +219,22 @@ private Thread createClusters() {
           cluster = builder.build();
           cluster.waitForClusterToBeReady();
           createdCount++;
-          clusters.put(cluster);
+          clusterResults.put(ClusterCreationResult.success(cluster));
         } catch (InterruptedException e) {
           if (cluster != null) {
             cluster.shutdown();
           }
           break;
         } catch (IOException | TimeoutException e) {
-          throw new RuntimeException("Unable to build cluster", e);
+          LOG.warn("Unable to build cluster", e);
+          if (cluster != null) {
+            cluster.shutdown();
+          }
+          try {
+            clusterResults.put(ClusterCreationResult.failure(e));

Review Comment:
   If an interrupt was already consumed during cluster creation or cleanup, `put()` can block on a full queue while `shutdown()` waits in `join()`. Would a bounded `offer()` be safer?



##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterProvider.java:
##########
@@ -215,14 +219,22 @@ private Thread createClusters() {
           cluster = builder.build();
           cluster.waitForClusterToBeReady();
           createdCount++;
-          clusters.put(cluster);
+          clusterResults.put(ClusterCreationResult.success(cluster));
         } catch (InterruptedException e) {
           if (cluster != null) {
             cluster.shutdown();
           }
           break;
         } catch (IOException | TimeoutException e) {
-          throw new RuntimeException("Unable to build cluster", e);
+          LOG.warn("Unable to build cluster", e);
+          if (cluster != null) {
+            cluster.shutdown();

Review Comment:
   Just a thought: This cleanup may be interrupted before it completes. It runs on the create thread, which provider shutdown interrupts, while the reaper thread intentionally avoids interrupting cluster cleanup
   
   The branch above does the same thing, so it may be fine to leave it as is. Would routing through `expiredClusters` be worth considering?



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "echonesis (via GitHub)" <gi...@apache.org>.
echonesis commented on code in PR #10989:
URL: https://github.com/apache/ozone/pull/10989#discussion_r3792346733


##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterProvider.java:
##########
@@ -215,14 +219,22 @@ private Thread createClusters() {
           cluster = builder.build();
           cluster.waitForClusterToBeReady();
           createdCount++;
-          clusters.put(cluster);
+          clusterResults.put(ClusterCreationResult.success(cluster));
         } catch (InterruptedException e) {
           if (cluster != null) {
             cluster.shutdown();
           }
           break;
         } catch (IOException | TimeoutException e) {
-          throw new RuntimeException("Unable to build cluster", e);
+          LOG.warn("Unable to build cluster", e);
+          if (cluster != null) {
+            cluster.shutdown();

Review Comment:
   I considered routing this through expiredClusters, but its bounded put() is also interruptible, so guaranteeing the handoff during shutdown would require additional queue-full and interruption handling across both cleanup branches. Since the branch above already uses synchronous cleanup, and the timed result offer() will prevent a consumed interrupt from blocking shutdown, I’d prefer to keep the existing cleanup pattern here.
   What do you think?



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #10989:
URL: https://github.com/apache/ozone/pull/10989#discussion_r4340244697


##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterProvider.java:
##########
@@ -215,14 +221,27 @@ private Thread createClusters() {
           cluster = builder.build();
           cluster.waitForClusterToBeReady();
           createdCount++;
-          clusters.put(cluster);
+          if (!addClusterResult(ClusterCreationResult.success(cluster))) {
+            cluster.shutdown();
+            break;
+          }
         } catch (InterruptedException e) {
           if (cluster != null) {
             cluster.shutdown();
           }
           break;
         } catch (IOException | TimeoutException e) {
-          throw new RuntimeException("Unable to build cluster", e);
+          LOG.warn("Unable to build cluster", e);

Review Comment:
   nit: when `build()` fails, `MiniOzoneClusterImpl` already logs "Unable to build MiniOzoneCluster" with the stack trace, and `provide()` rethrows the failure with this cause, so the trace gets reported twice. Consider logging without the stack trace here.
   
   ```suggestion
             LOG.warn("Unable to build cluster: {}", e.toString());
   ```



##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterProvider.java:
##########
@@ -231,10 +250,21 @@ private Thread createClusters() {
     return t;
   }
 
+  private boolean addClusterResult(ClusterCreationResult result)
+      throws InterruptedException {

Review Comment:
   nit: fits within 120 chars, no need to wrap. Same for the `ClusterCreationResult` constructor and the `new ClusterCreationResult()` in `failure()`.
   
   ```suggestion
     private boolean addClusterResult(ClusterCreationResult result) throws InterruptedException {
   ```



##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterProvider.java:
##########
@@ -215,14 +221,27 @@ private Thread createClusters() {
           cluster = builder.build();
           cluster.waitForClusterToBeReady();
           createdCount++;
-          clusters.put(cluster);
+          if (!addClusterResult(ClusterCreationResult.success(cluster))) {
+            cluster.shutdown();
+            break;
+          }
         } catch (InterruptedException e) {
           if (cluster != null) {
             cluster.shutdown();
           }
           break;
         } catch (IOException | TimeoutException e) {

Review Comment:
   `MiniOzoneClusterImpl.Builder.build()` rethrows `RuntimeException` as is (e.g. a metrics "source already exists" error), so that still kills the create thread and every later `provide()` waits 100s and fails with "Failed to obtain available cluster in time", which is the cascade this PR fixes. `TestBuilder` throws `IllegalStateException`. With the change below the test passes:
   
   ```suggestion
           } catch (IOException | TimeoutException | RuntimeException e) {
   ```
   
   Could you also add a test for it? For example:
   
   ```diff
          if (result instanceof IOException) {
            throw (IOException) result;
          }
   +      if (result instanceof RuntimeException) {
   +        throw (RuntimeException) result;
   +      }
   ```
   
   ```java
     @Test
     void retriesAfterRuntimeBuildFailure() throws Exception {
       RuntimeException failure = new IllegalStateException("failed");
       MiniOzoneCluster first = mock(MiniOzoneCluster.class);
       MiniOzoneClusterProvider provider = new MiniOzoneClusterProvider(new TestBuilder(failure, first), 1);
       try {
         IOException exception = assertThrows(IOException.class, provider::provide);
         assertSame(failure, exception.getCause());
         assertSame(first, provider.provide());
       } finally {
         provider.shutdown();
       }
     }
   ```



##########
hadoop-ozone/mini-cluster/src/test/java/org/apache/hadoop/ozone/TestMiniOzoneClusterProvider.java:
##########
@@ -0,0 +1,135 @@
+/*
+ * 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.hadoop.ozone;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import java.io.IOException;
+import java.time.Duration;
+import java.util.ArrayDeque;
+import java.util.Arrays;
+import java.util.Queue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.hadoop.hdds.conf.OzoneConfiguration;
+import org.junit.jupiter.api.Test;
+
+class TestMiniOzoneClusterProvider {
+
+  @Test
+  void retriesAfterBuildFailure() throws Exception {
+    IOException failure = new IOException("failed");
+    MiniOzoneCluster first = mock(MiniOzoneCluster.class);
+    MiniOzoneCluster second = mock(MiniOzoneCluster.class);
+    TestBuilder builder = new TestBuilder(failure, first, second);
+    MiniOzoneClusterProvider provider = new MiniOzoneClusterProvider(builder,
+        2);

Review Comment:
   nit: fits within 120 chars, no need to wrap. Same for the other `new MiniOzoneClusterProvider()` and `assertThrows(IOException.class, provider::provide)` calls, and the `shutdownDoesNotBlockWhenClusterCreationConsumesInterrupt() throws Exception` signature.
   
   ```suggestion
       MiniOzoneClusterProvider provider = new MiniOzoneClusterProvider(builder, 2);
   ```



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "echonesis (via GitHub)" <gi...@apache.org>.
echonesis commented on code in PR #10989:
URL: https://github.com/apache/ozone/pull/10989#discussion_r3792331295


##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterProvider.java:
##########
@@ -215,14 +219,22 @@ private Thread createClusters() {
           cluster = builder.build();
           cluster.waitForClusterToBeReady();
           createdCount++;
-          clusters.put(cluster);
+          clusterResults.put(ClusterCreationResult.success(cluster));
         } catch (InterruptedException e) {
           if (cluster != null) {
             cluster.shutdown();
           }
           break;
         } catch (IOException | TimeoutException e) {
-          throw new RuntimeException("Unable to build cluster", e);
+          LOG.warn("Unable to build cluster", e);
+          if (cluster != null) {
+            cluster.shutdown();
+          }
+          try {
+            clusterResults.put(ClusterCreationResult.failure(e));

Review Comment:
   Good point. I’ll use a 1-second timed offer() loop guarded by a shutdown flag. This avoids blocking join() indefinitely while preserving normal queue backpressure; any cluster that cannot be enqueued during shutdown will be closed.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "chihsuan (via GitHub)" <gi...@apache.org>.
chihsuan commented on code in PR #10989:
URL: https://github.com/apache/ozone/pull/10989#discussion_r3805830554


##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterProvider.java:
##########
@@ -215,14 +219,22 @@ private Thread createClusters() {
           cluster = builder.build();
           cluster.waitForClusterToBeReady();
           createdCount++;
-          clusters.put(cluster);
+          clusterResults.put(ClusterCreationResult.success(cluster));
         } catch (InterruptedException e) {
           if (cluster != null) {
             cluster.shutdown();
           }
           break;
         } catch (IOException | TimeoutException e) {
-          throw new RuntimeException("Unable to build cluster", e);
+          LOG.warn("Unable to build cluster", e);
+          if (cluster != null) {
+            cluster.shutdown();

Review Comment:
   Thanks for the explanation. Keeping the synchronous cleanup makes sense here.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "echonesis (via GitHub)" <gi...@apache.org>.
echonesis commented on code in PR #10989:
URL: https://github.com/apache/ozone/pull/10989#discussion_r4344320880


##########
hadoop-ozone/mini-cluster/src/main/java/org/apache/hadoop/ozone/MiniOzoneClusterProvider.java:
##########
@@ -215,14 +221,27 @@ private Thread createClusters() {
           cluster = builder.build();
           cluster.waitForClusterToBeReady();
           createdCount++;
-          clusters.put(cluster);
+          if (!addClusterResult(ClusterCreationResult.success(cluster))) {
+            cluster.shutdown();
+            break;
+          }
         } catch (InterruptedException e) {
           if (cluster != null) {
             cluster.shutdown();
           }
           break;
         } catch (IOException | TimeoutException e) {

Review Comment:
   Thank you for pointing this out. I added **RuntimeException** to the existing multi-catch and updated **TestBuilder** to rethrow runtime exceptions as suggested.
   
   I added **retriesAfterRuntimeBuildFailure()** to verify that **provide()** preserves the original exception as its cause and that a subsequent call receives a successfully created cluster. I also added a readiness failure test to verify cleanup when **build()** returns a cluster but **waitForClusterToBeReady()** throws a runtime exception. Both tests verify that failures do not consume the cluster limit.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "chihsuan (via GitHub)" <gi...@apache.org>.
chihsuan merged PR #10989:
URL: https://github.com/apache/ozone/pull/10989


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10989:
URL: https://github.com/apache/ozone/pull/10989#issuecomment-5706374125

   Thank you for your contribution. This PR is being closed due to inactivity. Please contact a maintainer if you would like to reopen it.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #10989: HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider
URL: https://github.com/apache/ozone/pull/10989


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "echonesis (via GitHub)" <gi...@apache.org>.
echonesis commented on code in PR #10989:
URL: https://github.com/apache/ozone/pull/10989#discussion_r4344186205


##########
hadoop-ozone/mini-cluster/src/test/java/org/apache/hadoop/ozone/TestMiniOzoneClusterProvider.java:
##########
@@ -0,0 +1,135 @@
+/*
+ * 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.hadoop.ozone;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import java.io.IOException;
+import java.time.Duration;
+import java.util.ArrayDeque;
+import java.util.Arrays;
+import java.util.Queue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.hadoop.hdds.conf.OzoneConfiguration;
+import org.junit.jupiter.api.Test;
+
+class TestMiniOzoneClusterProvider {
+
+  @Test
+  void retriesAfterBuildFailure() throws Exception {
+    IOException failure = new IOException("failed");
+    MiniOzoneCluster first = mock(MiniOzoneCluster.class);
+    MiniOzoneCluster second = mock(MiniOzoneCluster.class);
+    TestBuilder builder = new TestBuilder(failure, first, second);
+    MiniOzoneClusterProvider provider = new MiniOzoneClusterProvider(builder,
+        2);

Review Comment:
   Thank you. 
   I removed the unnecessary wrapping in the next commit.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16120. A single MiniOzoneCluster build timeout cascades into whole-suite failures in MiniOzoneClusterProvider [ozone]

Posted by "chihsuan (via GitHub)" <gi...@apache.org>.
chihsuan commented on PR #10989:
URL: https://github.com/apache/ozone/pull/10989#issuecomment-6338552453

   Thanks @echonesis for the patch. Thanks @smengcl for the review!


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org