marking unavailable shards as stale: – How to solve related issues

marking unavailable shards as stale: – How to solve related issues

Opster Team

Feb-21, Version: 1.7-8.0

To mark unavailable shards as stale, we recommend you run the Elasticsearch Error Check-Up. It’ll check all of the shards in your system and assist you in implementing any changes needed.


This guide will help you check for common problems that cause the log “marking unavailable shards as stale” to appear. It’s important to understand the issues related to the log, so to get started, read the general overview on common issues and tips related to the Elasticsearch concepts: allocation, cluster, index, routing and shards.

Log Context

Log “{} marking unavailable shards as stale: {}” classname is IndexMetaDataUpdater.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                     if (indexMetaDataBuilder == null) {
                        indexMetaDataBuilder = IndexMetaData.builder(oldIndexMetaData);
                    }
                    indexMetaDataBuilder.putInSyncAllocationIds(shardNumber; remainingInSyncAllocations);
                }
                logger.warn("{} marking unavailable shards as stale: {}"; shardEntry.getKey(); idsToRemove);
            }

            if (indexMetaDataBuilder != null) {
                if (metaDataBuilder == null) {
                    metaDataBuilder = MetaData.builder(oldMetaData);




 

Run the Check-Up to get a customized report like this:

Analyze your cluster