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

[Backport 2.x] Time series based workload desc order optimization through reverse se… #7457

Merged
merged 1 commit into from
May 8, 2023

Conversation

gashutos
Copy link
Contributor

@gashutos gashutos commented May 8, 2023

Backport of #7244

…gment read (opensearch-project#7244)

This commit changes the EngineConfig for timeseries indexes only (e.g., indexes that use
the @timestamp metadata field) so that a descending LeafSorter comparator is used to
visit segments in order of most newest to oldest. For the more infrequent case that a user
chooses to sort query results by ASC time, this would cause a search regression so the
ContextIndexSearcher is updated to inspect the sort order from the search request and
reverse the comparator so segments are visited in ascending order. LeafSorter behavior
for non-timeseries indexes is left the same.

Signed-off-by: gashutos <gashutos@amazon.com>
Signed-off-by: Chaitanya Gohel <104654647+gashutos@users.noreply.github.com>
@gashutos gashutos changed the title [Backport PR 7244] Time series based workload desc order optimization through reverse se… [Backport 2.x] Time series based workload desc order optimization through reverse se… May 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testStrictWeightedRoutingWithCustomString

@codecov-commenter
Copy link

Codecov Report

Merging #7457 (d7edeb7) into 2.x (c4a13dc) will decrease coverage by 0.02%.
The diff coverage is 46.66%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##                2.x    #7457      +/-   ##
============================================
- Coverage     70.29%   70.28%   -0.02%     
+ Complexity    59898    59829      -69     
============================================
  Files          4873     4873              
  Lines        288130   288170      +40     
  Branches      41885    41897      +12     
============================================
- Hits         202542   202530      -12     
- Misses        68607    68623      +16     
- Partials      16981    17017      +36     
Impacted Files Coverage Δ
.../main/java/org/opensearch/index/IndexSettings.java 85.45% <0.00%> (-0.68%) ⬇️
...va/org/opensearch/index/engine/InternalEngine.java 74.85% <0.00%> (+0.76%) ⬆️
...a/org/opensearch/test/OpenSearchIntegTestCase.java 54.95% <ø> (-0.64%) ⬇️
...va/org/opensearch/cluster/metadata/DataStream.java 84.15% <22.22%> (-6.06%) ⬇️
...va/org/opensearch/search/DefaultSearchContext.java 76.89% <22.22%> (-2.04%) ⬇️
...ava/org/opensearch/index/mapper/MappingLookup.java 92.79% <50.00%> (-0.79%) ⬇️
...ensearch/search/internal/ContextIndexSearcher.java 75.35% <66.66%> (-2.03%) ⬇️
...in/java/org/opensearch/index/shard/IndexShard.java 69.53% <83.33%> (-0.55%) ⬇️
...java/org/opensearch/index/engine/EngineConfig.java 98.50% <100.00%> (+0.04%) ⬆️
...g/opensearch/index/engine/EngineConfigFactory.java 92.95% <100.00%> (+0.10%) ⬆️

... and 489 files with indirect coverage changes

@reta reta merged commit 52630c4 into opensearch-project:2.x May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants