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

Refactor aggregation failure handling #199

Open
vmx opened this issue Jun 16, 2021 · 0 comments
Open

Refactor aggregation failure handling #199

vmx opened this issue Jun 16, 2021 · 0 comments

Comments

@vmx
Copy link

vmx commented Jun 16, 2021

This issue is triggered by #197.

@nikkolasg and I spent a lot of time debugging this and finding out whether there is a deeper root issue or not. It took so long because the code isn't really ideal. The problem was in the case an aggregation turns out to be invalid, then an "early termination" is the idea. This is triggered through a call to invalidate(). That call sets the valid variable to false, which will then exit the aggregation thread.

I want to present both of our view what the underlying issue is:

  • @nikkolasg prefers following the Go principles that the thread that spawns a child, should also be responsible to terminate it. This kind of is the case here, but it's so hidden, that it is almost invisible.
  • @vmx thinks (having learnt message passing in Erlang) the problem is the valid variable, which is kind of global state, which is manipulated somewhere hidden, with large consequences. I would hope that the code can be changed to terminate the aggregation thread as well as the ones that are sending through message passing.

This means that this issue doesn't really propose a proper solution, but is rather a placeholder that someone will hopefully find the time in the future to look deeper into this.

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

No branches or pull requests

1 participant