Skip to content

RTR: Dedupe items in getKnownTasks.#13273

Merged
gianm merged 1 commit intoapache:masterfrom
gianm:fix-rtr-dupe-known-tasks
Oct 28, 2022
Merged

RTR: Dedupe items in getKnownTasks.#13273
gianm merged 1 commit intoapache:masterfrom
gianm:fix-rtr-dupe-known-tasks

Conversation

@gianm
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 <gianmerlino@gmail.com>
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