Skip to content
Snippets Groups Projects
Unverified Commit 3698de17 authored by Mohamed S. Mahmoud's avatar Mohamed S. Mahmoud Committed by GitHub
Browse files

Merge pull request #114 from msherif1234/rst_ticker

NETOBSERV-753: Reset ticker if flows flushed when cacheMaxFlows is reached
parents 3f192b3c 7be21ebc
Branches
Tags
No related merge requests found
...@@ -74,6 +74,9 @@ func (c *Accounter) Account(in <-chan *RawRecord, out chan<- []*Record) { ...@@ -74,6 +74,9 @@ func (c *Accounter) Account(in <-chan *RawRecord, out chan<- []*Record) {
logrus.WithField("flows", len(evictingEntries)). logrus.WithField("flows", len(evictingEntries)).
Debug("evicting flows from userspace accounter after reaching cache max length") Debug("evicting flows from userspace accounter after reaching cache max length")
c.evict(evictingEntries, out) c.evict(evictingEntries, out)
// Since we will evict flows because we reached to cacheMaxFlows then reset
// evictTimer to avoid unnecessary another eviction when timer expires.
evictTick.Reset(c.evictTimeout)
} }
c.entries[record.Id] = &record.Metrics c.entries[record.Id] = &record.Metrics
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment