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

Ensure triggering of callback in chord #397

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

s-jakob
Copy link

@s-jakob s-jakob commented Jul 3, 2023

If one task for whatever reason is executed twice the callback is never triggered because the chord will be deleted before the last task is executed. The last task will then raise a warning that the chord can't be found.

If one task for whatever reason is executed twice the callback is never triggered because the chord will be deleted and the before the last task is executed. The last task then will raise a warning that the chord cant be found.
@auvipy auvipy self-requested a review July 6, 2023 05:19
@auvipy auvipy closed this Nov 8, 2023
@auvipy auvipy reopened this Nov 8, 2023
Copy link
Contributor

@AllexVeldman AllexVeldman left a comment

Choose a reason for hiding this comment

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

This makes sense, you could consider refrasing the warning so it indicates why it's emitted instead of what broke. Something like "Chord %s executed more tasks than expected"

Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

beside the review comments, we need to make sure the CI is green

@auvipy auvipy closed this Apr 27, 2024
@auvipy auvipy reopened this Apr 27, 2024
@s-jakob
Copy link
Author

s-jakob commented Apr 30, 2024

beside the review comments, we need to make sure the CI is green

The tests seem to be wrong. The counter goes to 0 but the group was not done.

@s-jakob s-jakob requested a review from auvipy April 30, 2024 15:45
Comment on lines +865 to +866
chord_counter.refresh_from_db()
assert chord_counter.count == 1
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is correct, we have a header of 2, 1 is done, the other fails.
If a task in the header fails the chord is done and the callback is not called.

If this is the case, a ChordCounter object will remain in the db for every failed chord.

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.

3 participants