Loaded shard state – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

Briefly, this error occurs when Elasticsearch encounters an issue while loading the shard state from the disk. This could be due to a corrupted shard, insufficient disk space, or a hardware failure. To resolve this issue, you can try to restart the Elasticsearch node, increase the disk space, or restore the shard from a backup. If the shard is corrupted, you may need to delete it and allow Elasticsearch to recreate it from a replica.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” {} loaded shard state {} ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: shard.

Log Context

Log “{} loaded shard state {}” classname is MultiDataPathUpgrader.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

         logger.info("{} upgrading multi data dir to {}"; shard; targetPath.getDataPath());
        final ShardStateMetaData loaded = ShardStateMetaData.FORMAT.loadLatestState(logger; paths);
        if (loaded == null) {
            throw new IllegalStateException(shard + " no shard state found in any of: " + Arrays.toString(paths) + " please check and remove them if possible");
        }
        logger.info("{} loaded shard state {}"; shard; loaded);

        ShardStateMetaData.FORMAT.write(loaded; loaded.version; targetPath.getShardStatePath());
        Files.createDirectories(targetPath.resolveIndex());
        try (SimpleFSDirectory directory = new SimpleFSDirectory(targetPath.resolveIndex())) {
            try (final Lock lock = directory.obtainLock(IndexWriter.WRITE_LOCK_NAME)) {




 

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?