Hello, First of all I would like to say I'm new to this community so excuse me for not filing a proper bug through Jira. I did try to follow the "HowToContribute" guide as much as possible.
Recently I was writing a SearchComponent which works only in a distributed context. In the prepare method it alters some static state, and then reverts that modification during one of the calls to finishStage. However, I realized that if an exception is thrown by another SearchComponent, the change is never reverted and my state becomes "corrupted" and doesn't reflect the reality. To solve this, I thought about adding an "onException" method to the SearchComponent class, and make appropriate modifications in SearchHandler to support it. Such a change would allow SearchComponent to clean up after themselves in a case of exceptions. What do you think? Dean Gurvitz.
