INNER CODE UNIT · Go
removeNotConfirmed
go-graphite/go-carbon · cache/cache.go:229
func removeNotConfirmed(shard *Shard, p *points.Points) bool {
for i := 0; i < shard.notConfirmedUsed; i++ {
if shard.notConfirmed[i] != p {
continue
}
copy(shard.notConfirmed[i:], shard.notConfirmed[i+1:shard.notConfirmedUsed])
shard.notConfirmedUsed--
shard.notConfirmed[shard.notConfirmedUsed] = nil
return true
}
return false
}
// Requeue moves a failed write from the in-flight list back to the live cache.
func (c *Cache) Requeue(p *points.Points) {
shard := c.GetShard(p.Metric)
shard.mu.Lock()