Trying to write new repository data over unfinished write repo is at – How to solve this OpenSearch error

Opster Team

Aug-23, Version: 1-1.1

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 OpenSearch operation.

Briefly, this error occurs when OpenSearch is attempting to write new repository data while a previous write operation is still in progress. This could be due to a slow network, heavy system load, or a bug in the software. To resolve this issue, you can try the following: 1) Check and improve your network speed if it’s slow. 2) Reduce system load by optimizing your queries or increasing system resources. 3) Ensure you’re using the latest version of OpenSearch, as this may be a bug that’s been fixed in a newer version.

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 ” Trying to write new repository data over unfinished write; repo [{}] is at ” to appear. To understand the issues related to this log, read the explanation below about the following OpenSearch concepts: repositories, blobstore, repository.

Log Context

Log “Trying to write new repository data over unfinished write; repo [{}] is at” classname is
We extracted the following from OpenSearch source code for those seeking an in-depth context :

                    final RepositoryMetadata meta = getRepoMetadata(currentState);
                    final String repoName =;
                    final long genInState = meta.generation();
                    final boolean uninitializedMeta = meta.generation() == RepositoryData.UNKNOWN_REPO_GEN || bestEffortConsistency;
                    if (uninitializedMeta == false && meta.pendingGeneration() != genInState) {
              "Trying to write new repository data over unfinished write; repo [{}] is at " +
                            "safe generation [{}] and pending generation [{}]";; genInState; meta.pendingGeneration());
                    assert expectedGen == RepositoryData.EMPTY_REPO_GEN || uninitializedMeta
                        || expectedGen == meta.generation() :
                        "Expected non-empty generation [" + expectedGen + "] does not match generation tracked in [" + meta + "]";


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?

Get expert answers on Elasticsearch/OpenSearch