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

RTR: Dedupe items in getKnownTasks. #13273

Merged
merged 1 commit into from
Oct 28, 2022

Conversation

gianm
Copy link
Contributor

@gianm gianm commented Oct 28, 2022

Fixes a problem where the tasks API in OverlordResource would complain about duplicate keys in the map it's building.

Fixes a problem where the tasks API in OverlordResource would complain
about duplicate keys in the map it's building.
Copy link
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!
So I guess there would be duplicates if say a task moves from "PENDING" to "RUNNING" and the running set is updated but the the pending set is still not updated?

@gianm
Copy link
Contributor Author

gianm commented Oct 28, 2022

So I guess there would be duplicates if say a task moves from "PENDING" to "RUNNING" and the running set is updated but the the pending set is still not updated?

The sets can be updated while getKnownTasks is running, so it's possible for the same task to be in both pendingTasks and runningTasks, if it moves in the time between reading those two sets.

@gianm gianm merged commit 5429b9d into apache:master Oct 28, 2022
@gianm gianm deleted the fix-rtr-dupe-known-tasks branch October 28, 2022 15:31
kfaraz pushed a commit to kfaraz/druid that referenced this pull request Oct 28, 2022
Fixes a problem where the tasks API in OverlordResource would complain
about duplicate keys in the map it's building.
@kfaraz kfaraz added this to the 24.0.1 milestone Oct 28, 2022
kfaraz added a commit that referenced this pull request Oct 30, 2022
Fixes a problem where the tasks API in OverlordResource would complain
about duplicate keys in the map it's building.

Co-authored-by: Gian Merlino <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants