You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/02/05 15:19:10 UTC

[GitHub] [ozone] smengcl edited a comment on pull request #1898: HDDS-3974. StateContext#addPipelineActionIfAbsent does not work as expected

smengcl edited a comment on pull request #1898:
URL: https://github.com/apache/ozone/pull/1898#issuecomment-774096221


   > > @symious done, tho in a slightly different way :)
   > 
   > Oh, I was proposing
   > 
   > ```
   >         for (PipelineAction pipelineActionIter : actionsForEndpoint) {
   >           if (pipelineActionIter.getAction() == pipelineAction.getAction()
   >               && pipelineActionIter.hasClosePipeline() && pipelineAction
   >               .hasClosePipeline()
   >               && pipelineActionIter.getClosePipeline().getPipelineID()
   >               .equals(pipelineAction.getClosePipeline().getPipelineID())) {
   >             actionsForEndpoint.add(pipelineAction);
   >             break;
   >           }
   > ```
   
   hmm, IMO the proposed loop wouldn't actually work as we expect. The goal of the loop inside was to iterate through all the existing actions before deciding if we need to queue it, IIUC?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org