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

Job sweeper fails to remove deleted jobs #96

Open
dbbaughe opened this issue Nov 10, 2021 · 0 comments
Open

Job sweeper fails to remove deleted jobs #96

dbbaughe opened this issue Nov 10, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@dbbaughe
Copy link
Contributor

From: opendistro-for-elasticsearch/job-scheduler#65

Found from this forum discussion in ISM: https://discuss.opendistrocommunity.dev/t/ism-attempting-to-interact-with-an-obsolete-index/3224

Job scheduler has an in-memory map that contains the scheduled jobs that are scheduled to run. When a job document is created, updated, or deleted this map is updated with the appropriate action. In this specific case the delete somehow failed which left a job that was still executing every 2 hours even though it didn't exist anymore. Ideally the sweeper would catch this and resolve the failure, but the sweeper has a bug where it doesn't remove jobs that were deleted.

For reference:

The sweeper is a background process that sweeps the job indices for job documents to schedule, re-schedule, and de-schedule documents. It does this on an interval defined by the sweep period. Every execution it will sweep all indices that were registered by plugins extending job scheduler which in turn will sweep the shards for each index. This sweepShard function is the one with the bug that is not handling job documents that were deleted from the index.

Comments:

From: @ftianli-amzn
Thanks @dbbaughe for the detailed and well-organized explanation.
Through your description, I think the problem is caused here: when de-scheduling fails, there is no backup to retry or anything else to deal with the failure .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📦 Backlog
Development

No branches or pull requests

1 participant