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

[Offline Nodes] Adds new library for offline tasks #13574

Merged
merged 35 commits into from
Aug 14, 2024

Conversation

linuxpi
Copy link
Collaborator

@linuxpi linuxpi commented May 7, 2024

Description

  • Adds a new library offline-tasks hosting all the base classes and interfaces to be used for Background Tasks

Related Issues

Resolves #13575

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • 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.

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

github-actions bot commented May 7, 2024

❌ Gradle check result for a444dd6: 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?

Copy link
Contributor

github-actions bot commented May 7, 2024

❌ Gradle check result for bf65b92: 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?

@github-actions github-actions bot added Storage Issues and PRs relating to data and metadata storage v2.15.0 Issues and PRs related to version 2.15.0 Storage:Performance labels May 7, 2024
Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

github-actions bot commented May 7, 2024

❌ Gradle check result for 68ae28f: 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?

Copy link
Contributor

github-actions bot commented Aug 4, 2024

✅ Gradle check result for 6470881: SUCCESS

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

github-actions bot commented Aug 5, 2024

✅ Gradle check result for 3a84e95: SUCCESS

Copy link
Contributor

github-actions bot commented Aug 6, 2024

❌ Gradle check result for 0ed8334: 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?

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

github-actions bot commented Aug 6, 2024

❕ Gradle check result for a1e3bc3: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@dblock
Copy link
Member

dblock commented Aug 6, 2024

Naively, this feels like a subset of capabilities of job-scheduler (https://github.com/opensearch-project/job-scheduler). Are we duplicating the functionality?

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

github-actions bot commented Aug 7, 2024

❌ Gradle check result for 21abf2a: 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?

@linuxpi
Copy link
Collaborator Author

linuxpi commented Aug 7, 2024

Naively, this feels like a subset of capabilities of job-scheduler (https://github.com/opensearch-project/job-scheduler). Are we duplicating the functionality?

Thanks for the feedback @dblock . The idea behind this PR is to add generic interfaces for Task Manager and a Task Definition structure which can be leveraged to execute any background Task. The concrete implementation(TaskManager) of the interfaces will come in subsequent PRs.

job-scheduler today helps with scheduling periodic jobs and defines a job definition in JobDetail.java which is tied to job-scheduler and the way it operates and assumes index as a store for the jobs while for background tasks we might not want to take a dependency on the indexes on data nodes.

When concrete implementation for the interfaces comes up, job-scheduler can/will be one of the options which can be considered to support the Task Manager implementation.

Copy link
Contributor

github-actions bot commented Aug 7, 2024

✅ Gradle check result for 21abf2a: SUCCESS

@dblock
Copy link
Member

dblock commented Aug 7, 2024

When concrete implementation for the interfaces comes up, job-scheduler can/will be one of the options which can be considered to support the Task Manager implementation.

Makes sense. I'm just asking to think about this a little more. From my birds eye view I think this feature/interface should be behind a feature flag until we come up with concrete implementations, and resolve any differences with job scheduler by either evolving the interface, or changing the existing job scheduler. Logically I'd want to be able to queue and schedule offline tasks of all kinds, some backed by an index, others backed by a different mechanism. This is because we've discussed moving job scheduler to core as "the" way of doing offline/remote/delayed tasks, and the proposal here seems to define "the way".

The other option is that all this code ships as a separate plugin, then it "competes" somewhat with job scheduler.

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

github-actions bot commented Aug 9, 2024

❌ Gradle check result for cf26f01: 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?

@linuxpi
Copy link
Collaborator Author

linuxpi commented Aug 9, 2024

From my birds eye view I think this feature/interface should be behind a feature flag until we come up with concrete implementations, and resolve any differences with job scheduler by either evolving the interface, or changing the existing job scheduler.

Yes, makes sense, although the interfaces are experimental, I have added a feature flag to guard the loading of the implementations in Node.java. Any future implementation can also use the same flag.

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

github-actions bot commented Aug 9, 2024

✅ Gradle check result for 9a87245: SUCCESS

@sachinpkale sachinpkale merged commit 68b74ff into opensearch-project:main Aug 14, 2024
33 of 34 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 14, 2024
---------

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Co-authored-by: Bukhtawar Khan <bukhtawa@amazon.com>
(cherry picked from commit 68b74ff)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
wdongyu pushed a commit to wdongyu/OpenSearch that referenced this pull request Aug 22, 2024
…t#13574)

---------

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Co-authored-by: Bukhtawar Khan <bukhtawa@amazon.com>
akolarkunnu pushed a commit to akolarkunnu/OpenSearch that referenced this pull request Sep 10, 2024
…t#13574)

---------

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Co-authored-by: Bukhtawar Khan <bukhtawa@amazon.com>
linuxpi pushed a commit that referenced this pull request Sep 17, 2024
…5247)

* [Offline Nodes] Adds new library for offline tasks (#13574)

---------

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Co-authored-by: Bukhtawar Khan <bukhtawa@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch Storage:Performance Storage Issues and PRs relating to data and metadata storage v2.17.0
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Offline Nodes] Add a new library containing required abstractions to run Offline Background Tasks
5 participants