GSI index [our index] not found

We are currently on Couchbase 4.5.1.

Had an internal customer use our tools to deploy an index. Let’s call it index_idx. Our tools automatically make replicas of the index and renamed them, so we got index_idx_172016000001 and index_idx_172016000002.

Waited for indexing to complete.

He ran his application, and was using USE INDEX index_idx as a suggestion. Error: GSI index index_idx not found.

So the thought was the suggestion wasn’t working properly, so I deployed the index as index_idx and removed the one from the host.

Waited for indexing to complete.

Same error. GSI index index_idx not found.

Made the same query from within Couchbase Administrator console and it was fine.

Customers code is in Node, so I took the same query and put it into .NET. Got the same error: GSI index index_idx not found.

Then, I changed SELECT * to SELECT count(1) and removed the USE QUERY suggestion. Then, the query worked in the .NET tool.

I reverted the query in the tool to be the original one. It worked.

Then, went back to the Node process, and attempted to re-run that. It succeeded.

It seems to be succeeding now.

When Index is dropped recreated the meatdata can be changed. So any prepared plans needs to be discarded and new prepare needs to be done.
Normally SDKs will catch the error and try to prepare transparently.

Thanks for the reply. All of this was done after process restarts, but queries were adhoc anyway. Each process was restarted at each step and we still had the failures.

The exception to the above is the .NET application we have to test queries. That does recreate a connection for each request, but the process itself was not restarted.

Basically, we had this unexpected behavior and I’m not sure what could be provided but wanted to find out if there was an open issue. We were very surprised by the behavior.