mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Retain deleted entries for longer time
When deleting entries or when learning about deleted entries remember then for a longer time to avoid excessive delete duplicates in the gossip cluster. Also added code changes to ignore event messages originated from the source node so that it doesn't get added into the rebroadcast queue. Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
This commit is contained in:
parent
e942cb3dd6
commit
8936daab5e
2 changed files with 6 additions and 1 deletions
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/hashicorp/memberlist"
|
||||
)
|
||||
|
||||
const reapInterval = 2 * time.Second
|
||||
const reapInterval = 30 * time.Second
|
||||
|
||||
type logWriter struct{}
|
||||
|
||||
|
|
|
@ -130,6 +130,11 @@ func (nDB *NetworkDB) handleTableMessage(buf []byte, isBulkSync bool) {
|
|||
return
|
||||
}
|
||||
|
||||
// Ignore messages that this node generated.
|
||||
if tEvent.NodeName == nDB.config.NodeName {
|
||||
return
|
||||
}
|
||||
|
||||
// Do not rebroadcast a bulk sync
|
||||
if rebroadcast := nDB.handleTableEvent(&tEvent); rebroadcast && !isBulkSync {
|
||||
var err error
|
||||
|
|
Loading…
Add table
Reference in a new issue