Skip to content

Commit

Permalink
[Transform] Log failure to get config as warning if not permanent
Browse files Browse the repository at this point in the history
When a transform that's just starting fails to get its config
this is always logged as an error, but only causes the transform
to fail if the reason for it is that something doesn't exist.
If the exception was just a transient search failure then the
problem is considered non-fatal, and can be logged as a warning
rather than an error.
  • Loading branch information
droberts195 committed Nov 23, 2023
1 parent 1a76d96 commit aa3f140
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,13 @@ protected void onStart(long now, ActionListener<Boolean> listener) {
}
}, failure -> {
String msg = TransformMessages.getMessage(TransformMessages.FAILED_TO_RELOAD_TRANSFORM_CONFIGURATION, getJobId());
logger.error(msg, failure);
// If the transform config index or the transform config is gone, something serious occurred
// We are in an unknown state and should fail out
if (failure instanceof ResourceNotFoundException) {
logger.error(msg, failure);
reLoadFieldMappingsListener.onFailure(new TransformConfigLostOnReloadException(msg, failure));
} else {
logger.warn(msg, failure);
auditor.warning(getJobId(), msg);
reLoadFieldMappingsListener.onResponse(null);
}
Expand Down

0 comments on commit aa3f140

Please sign in to comment.