Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.0.0
Description
/** * Add PipelineAction to PipelineAction queue if it's not present. * * @param pipelineAction PipelineAction to be added */ public void addPipelineActionIfAbsent(PipelineAction pipelineAction) { synchronized (pipelineActions) { /** * If pipelineAction queue already contains entry for the pipeline id * with same action, we should just return. * Note: We should not use pipelineActions.contains(pipelineAction) here * as, pipelineAction has a msg string. So even if two msgs differ though * action remains same on the given pipeline, it will end up adding it * multiple times here. */ for (InetSocketAddress endpoint : endpoints) { Queue<PipelineAction> actionsForEndpoint = this.pipelineActions.get(endpoint); for (PipelineAction pipelineActionIter : actionsForEndpoint) { if (pipelineActionIter.getAction() == pipelineAction.getAction() && pipelineActionIter.hasClosePipeline() && pipelineAction .hasClosePipeline() && pipelineActionIter.getClosePipeline().getPipelineID() .equals(pipelineAction.getClosePipeline().getPipelineID())) { break; } } actionsForEndpoint.add(pipelineAction); } } }
no matter absent or not, pipeline action will be added.
Attachments
Issue Links
- links to