mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-16 09:54:55 +00:00
[ML] Index the audit notification before responding to a delete request (elastic/x-pack-elasticsearch#1150)
This change prevents the situation where cleanup of ML indices immediately after deleting a job leaves the audit notification in limbo because the index it was due to be indexed into has been deleted. Relates elastic/x-pack-elasticsearch#1142 Original commit: elastic/x-pack-elasticsearch@300e9c36ce
This commit is contained in:
parent
5b19b8e7f0
commit
e549bc4ef9
@ -278,8 +278,8 @@ public class JobManager extends AbstractComponent {
|
||||
CheckedConsumer<Boolean, Exception> apiResponseHandler = jobDeleted -> {
|
||||
if (jobDeleted) {
|
||||
logger.info("Job [" + jobId + "] deleted.");
|
||||
actionListener.onResponse(new DeleteJobAction.Response(true));
|
||||
auditor.info(jobId, Messages.getMessage(Messages.JOB_AUDIT_DELETED));
|
||||
actionListener.onResponse(new DeleteJobAction.Response(true));
|
||||
} else {
|
||||
actionListener.onResponse(new DeleteJobAction.Response(false));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user