Skip to content
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

Fix es integration test 6094 #6157

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

madmecodes
Copy link

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 #6094

Which problem is this PR solving?

  • Resolves ES 8.x / v2 integration test often fails #6094
  • Fixes race conditions in ES integration tests where:
    • Index not found exceptions occur ~170ms after index creation
    • Duplicate spans are incorrectly detected (10 spans reduced to 5)

Description of the changes

  • Added thread-safe index readiness verification
    • Using sync.Map for index caching
    • Added proper index existence checks
    • Added wait/retry logic for index readiness
  • Fixed duplicate span detection
    • Added thread-safe span tracking using sync.Map
    • Improved logging around span operations

How was this change tested?

  • Ran ES integration tests multiple times with results:

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ES 8.x / v2 integration test often fails
1 participant