sodonnel commented on code in PR #4905:
URL: https://github.com/apache/ozone/pull/4905#discussion_r1231180949
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/WritableECContainerProvider.java:
##########
@@ -209,11 +211,13 @@ private ContainerInfo getContainerFromPipeline(Pipeline
pipeline)
NavigableSet<ContainerID> containers =
pipelineManager.getContainersInPipeline(pipeline.getId());
// Assume 1 container per pipeline for EC
- if (containers.size() == 0) {
- return null;
+ for (ContainerID containerID : containers) {
+ ContainerInfo container = containerManager.getContainer(containerID);
+ if (container.getOwner().equals(owner)) {
+ return container;
Review Comment:
With EC, a pipeline has a single container for the life of the pipeline. We
create a pipeline, add a container to it (in the allocateContainer()) method
and then we never allocate another container to it. When the container closes,
so should the pipeline and the same for when the pipeline closes, it will close
the container.
In this case, if you have two owners, and owner1 allocated the container and
then owner2 tries to use the pipeline, it will end up returning null here,
which will close the pipeline in the calling method - we certainly don't want
that as it will just result in the earlier closing of pipelines and a constant
battle between the two owners.
--
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]