Github user revans2 commented on the issue:

    https://github.com/apache/storm/pull/2442
  
    @jerrypeng TOPOLOGY_RAS_CONSTRAINT_MAX_STATE_SEARCH is not an effective 
limit on the max stack depth.  The max stack depth is the number of bolt and 
spout instances in a topology.  If we want to limit the depth then we need to 
have a separate config that limits the maximum number of components that can be 
scheduled, limiting the number of states searched is more around not spending 
too much time/CPU on something that is not likely to happen.
    
    I agree that having an iterative algorithm would be best, but the search is 
not tail recursive, so making the switch was not that simple and I thought it 
would be better to just get something out.  I did place some of the stack 
variables in SearcherState instead of on the call stack.  I could move more 
there, but the code would be rather ugly and not use as much of the nice java 
syntactic sugar.  We have been running with something like this in production 
for a while and have not had to set the stack size at all to make this work.


---

Reply via email to