aswinshakil commented on code in PR #10000:
URL: https://github.com/apache/ozone/pull/10000#discussion_r3048384046


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerManagerImpl.java:
##########


Review Comment:
   @rakeshadr @ashishkr200 `pipelineManager.hasEnoughSpace` is not a 
synchronized operation on the datanodes. We take lock on the pipeline 
`synchronized (pipeline.getId())`. Still two different pipelines can still 
allocate container on the same datanode. 
   
   We record the pending allocation on only Line 289. Until the code reaches 
that point multiple pipeline will be allocated to the same space on the 
datanode.
   
   Let's say we only have 6GB space available in d1.
   Pipeline 1: d1, d2, d3
   Pipeline 2: d1, d4, d5
   
   When we allocate container on both the pipeline, will get past 
`pipelineManager.hasEnoughSpace` and both will be allocated container 5GB *2 = 
10GB. But we only have 6GB on d1
   



-- 
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]

Reply via email to