[ 
https://issues.apache.org/jira/browse/STORM-3589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rui Li updated STORM-3589:
--------------------------
    Description: 
[https://github.com/apache/storm/blame/master/storm-server/src/main/java/org/apache/storm/scheduler/resource/strategies/scheduling/BaseResourceAwareStrategy.java#L280]

We should probably only peek but not remove value from nodeIterator in 
hasNext() function.

 

[https://github.com/apache/storm/blame/master/storm-server/src/main/java/org/apache/storm/scheduler/resource/strategies/scheduling/BaseResourceAwareStrategy.java#L296-L300]

 

And two consecutive next() call will cause problem.

  was:
[https://github.com/apache/storm/blame/master/storm-server/src/main/java/org/apache/storm/scheduler/resource/strategies/scheduling/BaseResourceAwareStrategy.java#L280]

We should probably only peek but not remove value from nodeIterator in 
hasNext() function.


> Iterator in BaseResourceStrategy is potentially buggy
> -----------------------------------------------------
>
>                 Key: STORM-3589
>                 URL: https://issues.apache.org/jira/browse/STORM-3589
>             Project: Apache Storm
>          Issue Type: Improvement
>            Reporter: Rui Li
>            Assignee: Rui Li
>            Priority: Minor
>
> [https://github.com/apache/storm/blame/master/storm-server/src/main/java/org/apache/storm/scheduler/resource/strategies/scheduling/BaseResourceAwareStrategy.java#L280]
> We should probably only peek but not remove value from nodeIterator in 
> hasNext() function.
>  
> [https://github.com/apache/storm/blame/master/storm-server/src/main/java/org/apache/storm/scheduler/resource/strategies/scheduling/BaseResourceAwareStrategy.java#L296-L300]
>  
> And two consecutive next() call will cause problem.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to