Skip to content

Replace search sorted by _id to _seq_no for query getting job metadata on sweep - #896

Merged
cwperks merged 6 commits into
opensearch-project:mainfrom
cwperks:no-sort-id
Mar 24, 2026
Merged

Replace search sorted by _id to _seq_no for query getting job metadata on sweep#896
cwperks merged 6 commits into
opensearch-project:mainfrom
cwperks:no-sort-id

Conversation

@cwperks

@cwperks cwperks commented Mar 24, 2026

Copy link
Copy Markdown
Member

Description

Fixes the issue described in #892 by sorting on _seq_no instead of _id.

See related alerting PR: opensearch-project/alerting#2039

Related Issues

Resolves #892

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

cwperks added 3 commits March 23, 2026 21:46
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
…a on sweep

Signed-off-by: Craig Perkins <cwperx@amazon.com>
cwperks added 2 commits March 24, 2026 15:56
This reverts commit c7fb917.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
This reverts commit 8f48921.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@codecov

codecov Bot commented Mar 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.48%. Comparing base (7c9d58f) to head (ffe1d10).

Files with missing lines Patch % Lines
...rg/opensearch/jobscheduler/sweeper/JobSweeper.java 92.30% 0 Missing and 1 partial ⚠️

❌ Your project check has failed because the head coverage (70.48%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #896      +/-   ##
==========================================
+ Coverage   70.29%   70.48%   +0.18%     
==========================================
  Files          42       42              
  Lines        2057     2060       +3     
  Branches      165      164       -1     
==========================================
+ Hits         1446     1452       +6     
+ Misses        503      496       -7     
- Partials      108      112       +4     

☔ 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.

@cliu123

cliu123 commented Mar 24, 2026

Copy link
Copy Markdown
Member

@prudhvigodithi @Swiddis @kaituo Would you please approve this quick PR? Thanks!

@cwperks
cwperks merged commit 014d31e into opensearch-project:main Mar 24, 2026
31 of 33 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In Review to ✅ Done in Engineering Effectiveness Board Mar 24, 2026
@opensearch-trigger-bot

Copy link
Copy Markdown
Contributor

The backport to 2.19 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/job-scheduler/backport-2.19 2.19
# Navigate to the new working tree
pushd ../.worktrees/job-scheduler/backport-2.19
# Create a new branch
git switch --create backport/backport-896-to-2.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 014d31e4f92d1dfeb39d8cfec5218e409e29c4b2
# Push it to GitHub
git push --set-upstream origin backport/backport-896-to-2.19
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/job-scheduler/backport-2.19

Then, create a pull request where the base branch is 2.19 and the compare/head branch is backport/backport-896-to-2.19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

[BUG] Job Scheduler fails to read from jobs indices when indices.id_field_data.enabled is set to false

3 participants