xiaoyuyao commented on a change in pull request #938:
URL: https://github.com/apache/hadoop-ozone/pull/938#discussion_r428961690
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateMap.java
##########
@@ -372,13 +372,20 @@ Pipeline updatePipelineState(PipelineID pipelineID,
PipelineState state)
Pipeline updatedPipeline = pipelineMap.compute(pipelineID,
(id, p) -> Pipeline.newBuilder(pipeline).setState(state).build());
PipelineQuery query = new PipelineQuery(pipeline);
+ List<Pipeline> pipelineList = query2OpenPipelines.get(query);
if (updatedPipeline.getPipelineState() == PipelineState.OPEN) {
// for transition to OPEN state add pipeline to query2OpenPipelines
- query2OpenPipelines.get(query).add(updatedPipeline);
+ if (pipelineList == null) {
Review comment:
query2OpenPipelines has been initialized in initializeQueryMap() based
on the RepType/ReFactor and has never been removed from the map. Correct me if
I'm wrong, the pipelineList should never be null unless different
RepType/Factor are specified in the query, which is currently impossible.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]