Briefly, this error occurs when Elasticsearch is unable to write the old state of the cluster due to issues like insufficient disk space, file system permissions, or network connectivity problems. To resolve this, you can free up disk space, check and adjust file system permissions, or troubleshoot network issues. Additionally, ensure that the Elasticsearch process has write access to the data directory.
This guide will help you check for common problems that cause the log ” [{}] [{}] failed to write old state ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.
Log Context
Log “[{}] [{}] failed to write old state” classname is JobModelSnapshotUpgrader.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
void restoreState() { try { process.restoreState(stateStreamer; params.modelSnapshot()); } catch (Exception e) { logger.error(() -> new ParameterizedMessage("[{}] [{}] failed to write old state"; jobId; snapshotId); e); setTaskToFailed( "Failed to write old state due to: " + e.getMessage(); ActionListener.wrap(t -> shutdown(e); f -> shutdown(e)) ); return;