-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
ES 8.x / v2 integration test often fails #6094
Comments
The logs from ES for creating the index and failing to query it are quite close in the timestamps: create index @ 2024-10-15T16:23:38.491Z:
query failure @ 2024-10-15T16:23:38.669Z (only 170ms later):
This could indicate a race condition where writes are happening too quickly, while the templates are still being created. I have not been seeing this error in v1 integration tests. |
When running in the local environment, the same issue does not occur. 😅 |
Depends on how many times you run it. It's intermittent. |
The test attempts to create an index and immediately tries to query it, leading to race conditions:create index @ 2024-10-15T16:23:38.491Z Hi @yurishkuro I'm new to the Jaeger project and would like to work on fixing this ES integration test race condition. I've already reproduced the issue locally and here are my observations:
There are multiple errors indicating that Elasticsearch is either failing to store spans correctly or that the test is querying indices that have not yet been created. Would you like to assign issue #6094 to me? |
Got dublicate span error also |
How are you planning to fix it? |
This change fixes two issues in ES integration tests: 1. Prevents index not found exceptions by proper index readiness checks 2. Prevents duplicate span detection issues The solution uses sync.Map for thread-safe: - Index existence caching - Span tracking Fixes jaegertracing#6094 Signed-off-by: ayush-gupta-dev <[email protected]>
This change fixes two issues in ES integration tests: 1. Prevents index not found exceptions by proper index readiness checks 2. Prevents duplicate span detection issues The solution uses sync.Map for thread-safe: - Index existence caching - Span tracking Fixes jaegertracing#6094 Signed-off-by: ayush-gupta-dev <[email protected]>
Hi @yurishkuro, Sorry for the delay in addressing this issue. I've implemented a fix for the ES integration test race conditions that addresses both problems: Index Creation Race Condition:
Duplicate Span Detection Issue:
The fix has been submitted in PR #6157 Would appreciate your review and feedback. |
- Add template creation retry with timeout in factory - Add context to CreateTemplates in writer - Ensure templates are created before returning writer Fixes jaegertracing#6094
- Add template creation retry with timeout in factory - Add context to CreateTemplates in writer - Ensure templates are created before returning writer Fixes jaegertracing#6094
Hi @madmecodes Are you still working on this? Or is there something where I could assist? |
Hi @Manik2708 i am having my university examination at the moment, will start contributing again from 11 december, mean while yes you can assist from the conversation we had. |
Can you tell me what is the exact enviornment you created in order to reproduce this error locally? |
https://github.com/jaegertracing/jaeger/actions/runs/11341694226/job/31567998272?pr=6091
The test is running this script:
bash scripts/es-integration-test.sh elasticsearch 8.x v2
some errors that might explain
This one looks like there was a retry save that resulted in duplicate spans in the storage:
This one looks like the test might have started running before the index mappings were created:
The text was updated successfully, but these errors were encountered: