Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
2.4.1
Describe the issue:
My company is using the security plugin with multi tenancy support, so each tenant can have their own private saved objects.
Recently I ran into a problem where the index patterns for hundreds of tenants needed to be updated on the Dashboard. Since there is no official saved objects api, I added the new index pattern and left the old one dangling. This is not pretty however and leaves our customers confused.
I knew from the following page: OpenSearch Dashboards multi-tenancy - OpenSearch documentation
that each tenant has his own hidden index where the saved objects are stored. I figured that I could simply remove the matching documents with the old index pattern saved object and remove them.
To my surprise, I found duplicate indices for tenants containing duplicates of the saved objects. The indices I found look like the following:
.kibana_HASH_mytenant_1
.kibana_HASH_mytenant_2
.kibana_HASH_mytenant_3
.kibana_HASH_mytenant_4
This does not match the documented behavior:
.kibana_<hash>_<tenant_name>
.kibana_<hash>_<username>
What does this postfix number on the index name represent and how does OpenSearch Dashboard know which saved object when there are duplicates?