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:
- Why are my indexes going inconsistently into different directories?
- Which indexes are my servers actually using?
- How can I configure an existing instance to use the correct index path?
- When the indexes are in both places, are they both getting updated, and if so, could this cause a performance hit?