mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
vendor swarmkit to 2dcf70aafdc9ea55af3aaaeca440638cde0ecda6
Revendors swarmkit to fix a bug that could result in a mutex deadlock in the logbroker. Signed-off-by: Drew Erny <derny@mirantis.com>
This commit is contained in:
parent
f32fc350ce
commit
6988f786f1
2 changed files with 13 additions and 2 deletions
|
@ -144,7 +144,7 @@ github.com/klauspost/compress a3b7545c88eea469c2246bee0e6c
|
|||
github.com/pelletier/go-toml 65ca8064882c8c308e5c804c5d5443d409e0738c # v1.8.1
|
||||
|
||||
# cluster
|
||||
github.com/docker/swarmkit ccf0585f543eae7d74104ddd8f339a960322d214 # master
|
||||
github.com/docker/swarmkit 2dcf70aafdc9ea55af3aaaeca440638cde0ecda6 # master
|
||||
github.com/gogo/protobuf b03c65ea87cdc3521ede29f62fe3ce239267c1bc # v1.3.2
|
||||
github.com/golang/protobuf 84668698ea25b64748563aa20726db66a6b8d299 # v1.3.5
|
||||
github.com/cloudflare/cfssl 5d63dbd981b5c408effbb58c442d54761ff94fbd # 1.3.2
|
||||
|
|
13
vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
generated
vendored
13
vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
generated
vendored
|
@ -204,20 +204,31 @@ func (s *subscription) watch(ch <-chan events.Event) error {
|
|||
}
|
||||
|
||||
add := func(t *api.Task) {
|
||||
// this mutex does not have a deferred unlock, because there is work
|
||||
// we need to do after we release it.
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
|
||||
// Un-allocated task.
|
||||
if t.NodeID == "" {
|
||||
s.pendingTasks[t.ID] = struct{}{}
|
||||
s.mu.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
delete(s.pendingTasks, t.ID)
|
||||
if _, ok := s.nodes[t.NodeID]; !ok {
|
||||
s.nodes[t.NodeID] = struct{}{}
|
||||
|
||||
s.mu.Unlock()
|
||||
|
||||
// if we try to call Publish before we release the lock, we can end
|
||||
// up in a situation where the receiver is trying to acquire a read
|
||||
// lock on it. it's hard to explain.
|
||||
s.changed.Publish(s)
|
||||
return
|
||||
}
|
||||
|
||||
s.mu.Unlock()
|
||||
}
|
||||
|
||||
for {
|
||||
|
|
Loading…
Reference in a new issue