-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GET {db}/_index endpoint response does not reflect index deletion #2621
Comments
mango's "list" function lists the contents of the ddoc_cache which does not accurately represent the list of indexes. In my opinion ddoc_cache should only be used to speed up the loading of design documents on request, it's not appropriate to use it to make any claim about the current state of the database. One of two paths suggest themselves;
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
In our pipeline endpoint
GET /{db}/_index
sometimes does not reflect the ddoc deletion with endpointDELETE/{db}/_index/_design/{ddoc}/{type}/{index}
.Locally I cannot reproduce the problem, it happens in the pipeline, when multiple database creation/deletion occurs parallelly.
Steps to Reproduce
Here is the full scenario:
GET {db}/_index
(index01 is listed)DELETE/{db}/_index/_design/{ddoc}/{type}/{index}
GET {db}/_index
(index01 is still listed)Expected Behaviour
At step 5. the
GET {db}/_index
request should not include the deleted index field.Your Environment
Additional Context
According to the discussion on a support channel the bug is that listing the existing indexes only queries an internal cache not the database itself.
It is an open question whether the deleted index ever got removed from the cache, if there is no other database changes.
The text was updated successfully, but these errors were encountered: