From 6f11d298eee5bbdff6403e4443490f04e99b467e Mon Sep 17 00:00:00 2001 From: Flavio Crisciani Date: Fri, 29 Sep 2017 21:05:24 -0700 Subject: [PATCH] Fix comparison against wrong constant The comparison was against the wrong constant value. As described in the comment the check is there to guarantee to not propagate events realted to stale deleted elements Signed-off-by: Flavio Crisciani --- networkdb/delegate.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/networkdb/delegate.go b/networkdb/delegate.go index c56e2f130a..6553810064 100644 --- a/networkdb/delegate.go +++ b/networkdb/delegate.go @@ -228,7 +228,8 @@ func (nDB *NetworkDB) handleTableEvent(tEvent *TableEvent) bool { // If it is a delete event and we did not have a state for it, don't propagate to the application // If the residual reapTime is lower or equal to 1/6 of the total reapTime don't bother broadcasting it around // most likely the cluster is already aware of it, if not who will sync with this node will catch the state too. - return e.reapTime > reapPeriod/6 + // This also avoids that deletion of entries close to their garbage collection ends up circuling around forever + return e.reapTime > reapEntryInterval/6 } var op opType