Skip to content

Implement fixed interval refresh task scheduling #17777

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

Merged

Conversation

ashking94
Copy link
Member

Description

Added fixed interval scheduling capability for refresh tasks to ensure consistent intervals between refreshes. Key changes:

  1. Introduced new setting cluster.index.refresh.fixed_interval_scheduling.enabled (default: false)
  2. Enhanced AbstractAsyncTask to track last run time and calculate dynamic sleep durations
  3. Added staggered start times for initial refreshes to prevent concurrent refreshes across shards

Related Issues

Meta issue: #17776

Check List

  • Functionality includes testing.
  • [ ] API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

Copy link
Contributor

github-actions bot commented Apr 3, 2025

❌ Gradle check result for 11bc39a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@ashking94 ashking94 force-pushed the fixed-refresh-interval branch from 11bc39a to 5c26a50 Compare April 3, 2025 08:11
@ashking94 ashking94 force-pushed the fixed-refresh-interval branch from 5c26a50 to dc2db9f Compare April 3, 2025 08:35
Copy link
Contributor

github-actions bot commented Apr 3, 2025

❌ Gradle check result for dc2db9f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@ashking94
Copy link
Member Author

❌ Gradle check result for dc2db9f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Test Result (1 failure / +1)org.opensearch.wlm.WorkloadManagementIT.testHighCPUInMonitorMode {p0={"search.concurrent_segment_search.enabled":"false"}}
--
[org.opensearch.wlm.WorkloadManagementIT.testHighCPUInMonitorMode {p0={"search.concurrent_segment_search.enabled":"false"}}](https://build.ci.opensearch.org/job/gradle-check/55468/testReport/junit/org.opensearch.wlm/WorkloadManagementIT/testHighCPUInMonitorMode__p0___search_concurrent_segment_search_enabled___false___/)

Copy link
Contributor

github-actions bot commented Apr 3, 2025

✅ Gradle check result for dc2db9f: SUCCESS

Copy link

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 93.10345% with 2 lines in your changes missing coverage. Please review.

Project coverage is 72.36%. Comparing base (8312e42) to head (dc2db9f).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...in/java/org/opensearch/indices/IndicesService.java 75.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17777      +/-   ##
============================================
- Coverage     72.51%   72.36%   -0.15%     
+ Complexity    66142    66050      -92     
============================================
  Files          5356     5356              
  Lines        306421   306446      +25     
  Branches      44393    44395       +2     
============================================
- Hits         222192   221772     -420     
- Misses        66024    66551     +527     
+ Partials      18205    18123      -82     

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

@sachinpkale sachinpkale merged commit 5f1b4ab into opensearch-project:main Apr 3, 2025
31 checks passed
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.

2 participants