Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Pass through all exceptions in IndicesLifecycleListeners #9330
I wonder if we should only rethrow exceptions of a certain exception type(s). I think the original idea was to protect against exceptions in listener code from causing an unneeded engine failure. Maybe we can even add this as a throws clause to the interface and document it as an official way to block index creation. Not sure, but I think it's worth considering. @dakrone what is your opinion?
Passing all exceptions through I think is cleaner in that there isn't a hidden element of a certain type of exception. Additionally listeners should handle exceptions themselves with a try-catch rather than bubbling them up so that they have to consider the failure case (ie, if this listener fails, do I really want to fail the shard)
@kimchy did you have any other reasons for preferring the re-throw versus certain exception type solution?