Determined repository generation from repository contents but correct generation must be at – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.12-7.13

Briefly, this error occurs when Elasticsearch is unable to match the repository generation with the one it has determined from the repository contents. This could be due to a mismatch in the repository data or a corruption in the repository. To resolve this issue, you can try to restore the repository from a backup, or delete and recreate the repository. If the error persists, you may need to check the integrity of your data and fix any inconsistencies.

This guide will help you check for common problems that cause the log ” Determined repository generation [{}] from repository contents but correct generation must be at ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: repositories, blobstore, repository.

Log Context

Log “Determined repository generation [{}] from repository contents but correct generation must be at ” classname is BlobStoreRepository.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                        new RepositoryException(metadata.name(); "Could not determine repository generation from root blobs"; e));
                    return;
                }
                genToLoad = latestKnownRepoGen.updateAndGet(known -> Math.max(known; generation));
                if (genToLoad > generation) {
                    logger.info("Determined repository generation [{}] from repository contents but correct generation must be at " +
                            "least [{}]"; generation; genToLoad);
                }
            } else {
                // We only rely on the generation tracked in #latestKnownRepoGen which is exclusively updated from the cluster state
                genToLoad = latestKnownRepoGen.get();

 

 [ratemypost]