Indexes not going into designated index path


I have several Couchbase servers running 4.5.1 Community Edition. A few of them are clustered, but most of them are single-node clusters.

Anyway, in each of these servers, I originally set them up so that the data goes into the default path for data, but the indexes go into a separate /index path. I do this based on recommended best practice that I learned when I took a course from Couchbase on Couchbase Administration.

Recently, I discovered that these index files have not always been going into the correct directory. And it’s extremely inconsistent. Sometimes they are all in the /data directory, sometimes they are all in the /index directory, and sometimes they are in both. And when they are in both, sometimes there are duplicates of the same indexes in both, and sometimes not.

What’s going on here?

I discovered this because I’m upgrading them all to 6.0 CE. The servers are all on separate machines, but they are each in a docker container on their machine. My upgrade process (which seems to work quite well) is to drop the existing docker container, and spin up a new couchbase 6.0 container that points to the same docker volume.

This way of upgrading seems fine, and super-easy. The only problem is, when the indexes are in the /index folder, they don’t appear in the upgraded server, and queries can’t be run.

So I have several questions:

  1. Why are my indexes going inconsistently into different directories?
  2. Which indexes are my servers actually using?
  3. How can I configure an existing instance to use the correct index path?
  4. When the indexes are in both places, are they both getting updated, and if so, could this cause a performance hit?

Hi @dbragg,

Sorry for the delayed response. Can you kindly share the cbcollect logs from the cluster where index distribution is inconsistent so that we can analyse the issue.

To answer some of your other questions, I would like to understand what kind of indexes you have in your cluster i.e. view indexes or secondary indexes or both.


Hi sorry for not responding sooner. The indexes are secondary indexes.

I’m not sure how obtain the cbcollect logs.



Apologies for delayed response.

Please refer to the “Couchbase server logs” section in to understand the procedure for collecting logs