opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.65k stars 1.78k forks source link

Update Signature of SearchResponseProcessor.process to either throw Runtime Exception or throw nothing. #8304

Open navneet1v opened 1 year ago

navneet1v commented 1 year ago

As called out by @andrross here: https://github.com/opensearch-project/OpenSearch/pull/7283#discussion_r1244011596, we should update the interfaces and transform calls of the processors to catch the runtime exceptions. This will ensure that if threads are providing Interrupt exceptions are handled properly and threads can be interrupted.

Code ref: https://github.com/opensearch-project/OpenSearch/blob/b040d3bd01c46989d28414dbc7694c8079283502/server/src/main/java/org/opensearch/search/pipeline/Pipeline.java#L185-L194

@msfroh

macohen commented 1 year ago

@noCharger can you take a look here, please?