adoroszlai opened a new pull request #2394:
URL: https://github.com/apache/ozone/pull/2394


   ## What changes were proposed in this pull request?
   
   `MockNodeManager` allows 2 pipelines per node by default, ignoring the limit 
set for `ozone.scm.datanode.pipeline.limit`.  Thus sometimes 2 of the 5 
pipelines created in `testPipelineReload` are placed on the same set of nodes 
(first and fourth pipelines here):
   
   ```
   ... (PipelineStateManager.java:addPipeline(55)) - Created pipeline Pipeline[ 
Id: 19231930-d31f-484c-a11d-3dcfe3ebc089, Nodes: 
524b9db9-a0ad-4f72-9414-75ea62214723{...}0cc76e30-a109-4d81-b126-e550c71e8aa4{...}5a51c647-2566-4b22-a60d-f36c81395608{...},
 ...
   ... (PipelineStateManager.java:addPipeline(55)) - Created pipeline Pipeline[ 
Id: 70b80e88-6ccf-4b26-9d63-f613e05ef486, Nodes: 
98ece774-30e7-44c9-8013-4d4b472308c8{...}12638ad9-e21f-49cb-ae18-8f89c94ab110{...}13304be9-7453-401d-b4f5-1a33c88e6266{...},
 ...
   ... (PipelineStateManager.java:addPipeline(55)) - Created pipeline Pipeline[ 
Id: 71ba0c21-5c59-4e7b-909a-8dfefe798b5f, Nodes: 
b8382acd-de51-4828-9227-861fcbe5437e{...}dd7d41dc-8ae2-4308-b659-605f94bdf9db{...}39380a51-1069-4ac8-8cbd-fbd16eb30234{...},
 ...
   ... (PipelineStateManager.java:addPipeline(55)) - Created pipeline Pipeline[ 
Id: ef4caead-0bfa-4474-abec-9422e489cfa6, Nodes: 
524b9db9-a0ad-4f72-9414-75ea62214723{...}0cc76e30-a109-4d81-b126-e550c71e8aa4{...}5a51c647-2566-4b22-a60d-f36c81395608{...},
 ...
   ... (PipelineStateManager.java:addPipeline(55)) - Created pipeline Pipeline[ 
Id: fd635169-c5de-4842-b3a0-479cf35f54f0, Nodes: 
2fa7133a-1db6-4d8c-85ca-ee1304ef1a36{...}dd7d41dc-8ae2-4308-b659-605f94bdf9db{...}39380a51-1069-4ac8-8cbd-fbd16eb30234{...},
 ...
   ```
   
   resulting in 4 distinct node sets:
   
   ```
   AssertionError: expected:<5> but was:<4>
     ...
     at 
org.apache.hadoop.hdds.scm.pipeline.TestSCMPipelineManager.testPipelineReload(TestSCMPipelineManager.java:167)
   ```
   
   Reproduced 8 times in 1000 repetitions:
   https://github.com/adoroszlai/hadoop-ozone/runs/3008619255#step:4:1192
   
   Fixed by explicitly setting the limit for `MockNodeManager`:
   
   ```
   setNumPipelinePerDatanode(1)
   ```
   
   https://issues.apache.org/jira/browse/HDDS-5416
   
   ## How was this patch tested?
   
   Executed the test 1000 times again, no failures:
   https://github.com/adoroszlai/hadoop-ozone/runs/3008622281#step:4:1192


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