OpenSearch: [BUG] 'index_not_found_exception' intermittently returning from `/bulk` requests when index does exist
Describe the bug
I’m encountering an extremely odd issue with OpenSearch while using Searchkick, a Rails gem for search functionality. I have the latest version of OpenSearch deployed in a Kubernetes cluster. The problem arises after I create and start populating an index. Randomly, I begin receiving index_not_found_exceptions after creating and attempting to fill an index using /bulk.
This is particularly perplexing because I added logs to check the index status with the following requests, /_cat/indices/index_name and /index_name. These logs confirm that the index exists, is green, and is open. I’m at an impasse and can’t figure out what might be causing this issue.
Log before filling to make sure index exists and is available: green open staging_features_staging_20240524193642689 lGfB2eZZRXGHZ7CIspnELQ 1 1 292 0 2.1mb 1mb
Log right after: {“type”=>“index_not_found_exception”, “reason”=>“no such index [staging_features_staging_20240524193642689]”, “index”=>“staging_features_staging_20240524193642689”, “index_uuid”=>“lGfB2eZZRXGHZ7CIspnELQ”}
Related component
Indexing
To Reproduce
It’s almost impossible for me to replicate reliably, but the flow I use to do it is:
- Create a new index
- Update mappings
- Use bulk and attempt to populate index
Expected behavior
There shouldn’t an exception saying the index does not exist if I can log information about the index and discern it is healthy one line prior.
Additional Details
Plugins Please list all plugins currently enabled.
Screenshots
Host/Environment (please complete the following information):
- OS: Linux Hosted on K8s using the chart version below
- https://opensearch-project.github.io/helm-charts version: 2.19.0 (latest)
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 21 (10 by maintainers)
@reta @gaobinlong Thanks for your assistance with this issue, closing now!
Yes, exactly! That is most likely the issue, thanks. I will update our cluster and then close this issue.
Thank you @CarterBland , super helpful, I will try to reproduce the issue with the details we have now, will update you shortly.
@reta Sorry for my confusion, working with packages tends to abstract a lot! I do believe mappings are dynamic. Proof below:
@reta I am in the process of tracking this right now. At this point I know for sure the index is created with basic mappings. I am currently figuring out how it gets the other mappings and if it happens before the bulk index.
@peternied I’ll try and get a minimal test-case up. I just started seeing this using the latest version, and I don’t believe I see this outside of the cluster, going to test to confirm.