Depedency Issues - Flooding Invalidation Queue (#9)

* adding logs for queue

* fix: streaming queue information with status instead of logging it

* chore: add logs to cache dependency handling

* fix: add depLength logging to dependency invalidation, prepare potential fix for queueing issue

* fix: prevent cache dependency duplication in retry queue

* fix: remove redundant logs
This commit is contained in:
josenner 2020-02-04 16:06:48 +01:00 committed by GitHub
parent 34ca1ca22a
commit 46a7350439
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,16 @@ func (c *cacheDependency) Set(sourceID, targetID string) {
if _, ok := c.dependencies[targetID]; !ok {
c.dependencies[targetID] = []string{}
}
c.dependencies[targetID] = append(c.dependencies[targetID], sourceID)
match := false
for _, id := range c.dependencies[targetID] {
if id == sourceID {
match = true
break
}
}
if !match {
c.dependencies[targetID] = append(c.dependencies[targetID], sourceID)
}
c.lock.Unlock()
return
}