moby--moby/libnetwork/networkdb
Flavio Crisciani f0fcb0bbe6 Fixed race on quick node fail/join
The previous logic was not properly handling the case of a node
that was failing and oining back in short period of time.
The issue was in the handling of the network messages.
When a node joins it sync with other nodes, these are passing
the whole list of nodes that at best of their knowledge are part
of a network. At this point if the node receives that node A is part
of the network it saves it before having received the notification
that node A is actually alive (coming from memberlist).
If node A failed the source node will receive the notification
while the new joined node won't because memberlist never advertise
node A as available. In this case the new node will never purge
node A from its state but also worse, will accept any table notification
where node A is the owner and so will end up in a out of sync state
with the rest of the cluster.

This commit contains also some code cleanup around the area of node
management

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-11-27 14:38:06 -08:00
..
broadcast.go NetworkDB create NodeID for cluster nodes 2017-09-26 10:48:04 -07:00
cluster.go Fixed race on quick node fail/join 2017-11-27 14:38:06 -08:00
delegate.go Fixed race on quick node fail/join 2017-11-27 14:38:06 -08:00
event_delegate.go Fixed race on quick node fail/join 2017-11-27 14:38:06 -08:00
message.go NetworkDB allow setting PacketSize 2017-07-26 13:44:33 -07:00
networkdb.go Fixed race on quick node fail/join 2017-11-27 14:38:06 -08:00
networkdb.pb.go Fix reapTime logic in NetworkDB 2017-09-21 09:37:37 -07:00
networkdb.proto Fix reapTime logic in NetworkDB 2017-09-21 09:37:37 -07:00
networkdb_test.go Add test to confirm garbage collection 2017-10-23 09:58:57 +02:00
networkdbdiagnose.go Fix listen port for test infra 2017-11-16 16:23:44 -08:00
watch.go Fix leak of handleTableEvents 2017-05-31 11:04:19 -07:00