Skip to content

Conversation

pipiland2612
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Optimize search index (by time range)

How was this change tested?

  • make lint test
  • bash scripts/e2e/spm.sh -b jaeger -m elasticsearch run successfully

Checklist

@pipiland2612 pipiland2612 requested a review from a team as a code owner July 16, 2025 18:08
@pipiland2612 pipiland2612 changed the title Add Optimisation by time range [spm] Add optimisation by time range Jul 16, 2025
Copy link

codecov bot commented Jul 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.44%. Comparing base (fe7e90a) to head (176a803).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7322      +/-   ##
==========================================
- Coverage   96.46%   96.44%   -0.02%     
==========================================
  Files         378      378              
  Lines       22910    22927      +17     
==========================================
+ Hits        22101    22113      +12     
- Misses        612      616       +4     
- Partials      197      198       +1     
Flag Coverage Δ
badger_v1 9.16% <0.00%> (-0.01%) ⬇️
badger_v2 1.75% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 11.90% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-auto 1.74% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 1.74% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 11.90% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-auto 1.74% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 1.74% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 16.77% <83.33%> (+0.02%) ⬆️
elasticsearch-7.x-v1 16.82% <83.33%> (+0.02%) ⬆️
elasticsearch-8.x-v1 16.98% <83.33%> (+0.02%) ⬆️
elasticsearch-8.x-v2 1.84% <0.00%> (+0.08%) ⬆️
grpc_v1 10.40% <0.00%> (-0.01%) ⬇️
grpc_v2 1.75% <0.00%> (-0.01%) ⬇️
kafka-3.x-v1 9.32% <0.00%> (-0.01%) ⬇️
kafka-3.x-v2 1.75% <0.00%> (-0.01%) ⬇️
memory_v2 1.75% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 16.86% <83.33%> (+0.02%) ⬆️
opensearch-2.x-v1 16.86% <83.33%> (+0.02%) ⬆️
opensearch-2.x-v2 1.75% <0.00%> (-0.01%) ⬇️
query 1.75% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.48% <0.00%> (-0.01%) ⬇️
unittests 95.41% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pipiland2612 pipiland2612 force-pushed the Optimize_index_search_by_time_range branch from be3f64d to 3411203 Compare July 17, 2025 09:04
@pipiland2612 pipiland2612 requested a review from yurishkuro July 17, 2025 10:49
@pipiland2612 pipiland2612 requested a review from yurishkuro July 18, 2025 06:28
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
@pipiland2612 pipiland2612 force-pushed the Optimize_index_search_by_time_range branch from 47b3e7e to 9b5dd2c Compare July 20, 2025 14:27
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
@pipiland2612 pipiland2612 requested a review from yurishkuro July 20, 2025 14:30
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
@@ -225,7 +231,7 @@ func timeRangeIndices(indexName, indexDateLayout string, startTime time.Time, en
var indices []string
firstIndex := indexWithDate(indexName, indexDateLayout, startTime)
currentIndex := indexWithDate(indexName, indexDateLayout, endTime)
for currentIndex != firstIndex {
for currentIndex != firstIndex && endTime.After(startTime) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add this check to prevent infinite loop

@pipiland2612
Copy link
Contributor Author

Hi @yurishkuro, the pr is ready for your review! Thanks

@yurishkuro yurishkuro added the changelog:exprimental Change to an experimental part of the code label Jul 20, 2025
@yurishkuro yurishkuro added this pull request to the merge queue Jul 20, 2025
Merged via the queue into jaegertracing:main with commit 3cce66e Jul 20, 2025
61 of 62 checks passed
@pipiland2612 pipiland2612 deleted the Optimize_index_search_by_time_range branch July 21, 2025 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage changelog:exprimental Change to an experimental part of the code storage/elasticsearch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants