sodonnel opened a new pull request, #4968:
URL: https://github.com/apache/ozone/pull/4968
## What changes were proposed in this pull request?
As it stands, the method:
```
PipelineManager.createPipeline(ReplicationConfig replicationConfig,
List<DatanodeDetails> excludedNodes, List<DatanodeDetails>
favoredNodes)
```
Is used to create a new pipeline and add it to the Pipeline manager. This
creation and adding is all performed under a single lock The somewhat expensive
node selection process from the placement policy is performed under the lock.
For Ratis pipelines, this could be important, as pipelines are created and
limited based on the number of existing pipelines on the nodes.
EC pipelines do not have such a limitation, and they also need to be created
much more frequently due to their short lived nature.
This PR changes the pipeline manager to have a buildPipeline Method, which
calls the placement policy and creates the new pipeline object without any
locks.
Then there is an addPipeline method to add the created pipeline to the
pipelineManager under the lock.
This will allow for the WritableECPipelineProvider to build pipelines
without blocking other threads and then add them to the manager under a lock,
reducing the amount of work performed under a lock. This change would need to
be made in another PR.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-8919
## How was this patch tested?
Modified one test to call the new methods
--
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]