Deleting results after deleteAfter – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.7

Briefly, this error occurs when you’re trying to delete documents in Elasticsearch after a certain period (deleteAfter), but the system fails to execute the operation. This could be due to incorrect syntax, insufficient permissions, or a non-existent index. To resolve this, ensure you’re using the correct syntax for the delete operation. Also, check if the user has the necessary permissions to delete documents. Lastly, verify if the index you’re trying to delete documents from actually exists.

This guide will help you check for common problems that cause the log ” Deleting results after ‘” + deleteAfter + “‘ ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: delete, plugin.

Log Context

Log “Deleting results after ‘” + deleteAfter + “‘” classname is TransportRevertModelSnapshotAction.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        return ActionListener.wrap(response -> {
            Date deleteAfter = modelSnapshot.getLatestResultTimeStamp();
            logger.debug("Removing intervening records: last record: " + deleteAfter + "; last result: "
                    + modelSnapshot.getLatestResultTimeStamp());

            logger.info("Deleting results after '" + deleteAfter + "'");

            JobDataDeleter dataDeleter = new JobDataDeleter(client; jobId);
            dataDeleter.deleteResultsFromTime(deleteAfter.getTime() + 1; new ActionListener() {
                @Override
                public void onResponse(Boolean success) {

 

 [ratemypost]