You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2021/06/16 11:31:00 UTC

[jira] [Created] (HDDS-5355) In ContainerStateMachine, share the executor threads between the containers

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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org