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

Improve Coordinator.Stop / Task Manager Shutdown #94

Open
schmichael opened this issue Dec 31, 2014 · 0 comments
Open

Improve Coordinator.Stop / Task Manager Shutdown #94

schmichael opened this issue Dec 31, 2014 · 0 comments

Comments

@schmichael
Copy link
Contributor

As of 8f870a5 taskmgr should never have to release a task during stop().

This code should probably log or panic or something:

metafora/m_etcd/taskmgr.go

Lines 179 to 180 in 8f870a5

default:
close(states.release)

Or do nothing except block on the waitgroup?

Alternate to fix embedded coordinator

Update: Fixed by #98

There's a race with the embedded coordinator where the consumer shutting down causes a deadlock because embedded's Release blocks on the released task being claimed again or Close being called.

Close won't be called until the task is Released though! So the embedded coordinator either needs fixing or we need to reevaluate the relationship between Coordinator.Close() and task releasing.

@schmichael schmichael changed the title Improve Task Manager Shutdown Improve Coordinator.Stop / Task Manager Shutdown Jan 13, 2015
schmichael added a commit that referenced this issue Jan 14, 2015
Kind of fixes #94 ... there's got to be a better way
schmichael added a commit that referenced this issue Jan 21, 2015
This fixes a deadlock in embedded tests where a task is released during
shutdown but there's no watcher to accept it.

Related to #94
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