Fix #4493: ElasticSearch publisher goes into pause mode if a document missing exception thrown (#4494)

This commit is contained in:
Sriharsha Chintalapani 2022-04-25 23:47:58 -07:00 committed by GitHub
parent a81c8db8be
commit 81f8be0b58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,10 +135,7 @@ public class ElasticSearchEventPublisher extends AbstractEventPublisher {
} catch (ElasticsearchException e) {
LOG.error("failed to update ES doc");
LOG.debug(e.getMessage());
if (e.status() == RestStatus.NOT_FOUND
|| e.status() == RestStatus.GATEWAY_TIMEOUT
|| e.status() == RestStatus.INTERNAL_SERVER_ERROR
|| e.status() == RestStatus.REQUEST_TIMEOUT) {
if (e.status() == RestStatus.GATEWAY_TIMEOUT || e.status() == RestStatus.REQUEST_TIMEOUT) {
LOG.error("Error in publishing to ElasticSearch");
throw new ElasticSearchRetriableException(e.getMessage());
} else {