Tsz-wo Sze created HDDS-5355:
--------------------------------

             Summary: In ContainerStateMachine, share the executor threads 
between the containers
                 Key: HDDS-5355
                 URL: https://issues.apache.org/jira/browse/HDDS-5355
             Project: Apache Ozone
          Issue Type: Improvement
          Components: Ozone Datanode
            Reporter: Tsz-wo Sze
            Assignee: Tsz-wo Sze


{code:java}
//ContainerStateMachine
  private ExecutorService getCommandExecutor(
      ContainerCommandRequestProto requestProto) {
    int executorId = (int)(requestProto.getContainerID() % executors.length);
    return executors[executorId];
  }
{code}
In the code above, different containers having the same remainder (mod 
executors.length ) will use the same executor even if some other executors are 
idle.  Ideally, different containers should use a different executor if there 
are executors available.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to