File corruption on recovery local checksum OK – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 1.3-1.3

Briefly, this error occurs when Elasticsearch detects a discrepancy between the local and remote checksums during shard recovery. This usually indicates a data corruption issue. To resolve this, you can try to restore the data from a recent snapshot. If no snapshot is available, you can try to reindex the data. Additionally, ensure that your hardware is functioning properly as hardware issues can often cause data corruption. Lastly, consider enabling the “index.translog.durability” setting to “request” to ensure that the translog is fsynced after every operation, reducing the risk of data corruption.

This guide will help you check for common problems that cause the log ” {} File corruption on recovery {} local checksum OK ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: discovery-file, indices, recovery and source.

Log Context

Log “{} File corruption on recovery {} local checksum OK” classname is RecoverySource.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

} else { // corruption has happened on the way to replica
                                            RemoteTransportException exception = new RemoteTransportException("File corruption occured on recovery but checksums are ok"; null);
                                            exception.addSuppressed(e);
                                            exceptions.add(0; exception); // last exception first
                                            logger.warn("{} File corruption on recovery {} local checksum OK"; corruptIndexException; shard.shardId(); md);
                                        }
                                    } else {
                                        exceptions.add(0; e); // last exceptions first
                                    }
                                } finally {

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?