Copilot commented on code in PR #10693:
URL: https://github.com/apache/ozone/pull/10693#discussion_r3574500887


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/ReplicationSupervisor.java:
##########
@@ -304,9 +394,49 @@ public void stop() {
         executor.shutdownNow();
       }

Review Comment:
   ReplicationSupervisor.stop() calls executor.shutdownNow() but ignores the 
returned queued tasks. Any TaskRunner instances drained this way will never run 
their finally block, leaving queuedCounter/taskCounter/inFlight inconsistent 
(and now handled for per-volume pools via cancelDrainedTaskRunners). Capture 
the drained list from shutdownNow and pass it through cancelDrainedTaskRunners 
for consistency.



##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/ReplicationSupervisor.java:
##########
@@ -304,9 +394,49 @@ public void stop() {
         executor.shutdownNow();
       }
     } catch (InterruptedException ie) {
-      // Ignore, we don't really care about the failure.
       Thread.currentThread().interrupt();
     }
+    if (volumePools != null) {
+      cancelDrainedTaskRunners(volumePools.shutdownAll());
+    }
+  }
+
+  public ReplicationConfig getReplicationConfig() {
+    return replicationConfig;
+  }
+
+  public void setPerVolumePoolSize(int newSize) {
+    if (volumePools != null) {
+      replicationConfig.setPerVolumeStreamsLimit(newSize);
+      resize(state.get());
+    }

Review Comment:
   The PR description lists a known limitation that reconfiguring per-volume 
streams does not re-apply outofservice.limit.factor during decommissioning, but 
setPerVolumePoolSize() calls resize(state.get()), and resize() applies 
scaleOutOfServiceLimit() for MAINTENANCE/DECOMMISSION. If the code is correct, 
the limitation in the PR description should be updated/removed to avoid 
misleading operators and reviewers.



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

Reply via email to