sodonnel commented on code in PR #6052:
URL: https://github.com/apache/ozone/pull/6052#discussion_r1463181636
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/ReplicationServer.java:
##########
@@ -154,6 +155,31 @@ public int getPort() {
return port;
}
+ public void setPoolSize(int size) {
Review Comment:
There is logic in `nodeStateUpdated` that doubles the threads and queue size
if the node is decommissioning or entering maintenance. I think that with this
change, if the pool size had been doubled, this will not respect that.
Additionally, there is a function passed to ReplicationServer to do the
update for that purpose. It is passed in from ReplicationSupervisorBuilder:
```
executorThreadUpdater = threadCount -> {
if (threadCount < tpe.getCorePoolSize()) {
tpe.setCorePoolSize(threadCount);
tpe.setMaximumPoolSize(threadCount);
} else {
tpe.setMaximumPoolSize(threadCount);
tpe.setCorePoolSize(threadCount);
}
};
```
I think that after the config object is updated, we need to invoke the logic
in `nodeStateUpdated` as that may cause the threads to be doubled in the node
is decommissioning or entering maintenance. Maybe we need a force flag on that
method so it always run even if the newState == oldState, or we need to extract
the logic for whether to scale it up or not out into another method this
reconfig could use.
--
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]