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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]