Skip to content

Commit

Permalink
Stop flooding WARNING logs with 'couldn't delete flow entry' (#1408)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariomac authored Nov 25, 2024
1 parent d19600e commit 845cce3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/internal/netolly/ebpf/sock_tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func (m *SockFlowFetcher) LookupAndDeleteMap() map[NetFlowId][]NetFlowMetrics {
// TODO: detect whether LookupAndDelete is supported (Kernel>=4.20) and use it selectively
for iterator.Next(&id, &metrics) {
if err := flowMap.Delete(id); err != nil {
tlog().Warn("couldn't delete flow entry", "flowId", id)
tlog().Debug("couldn't delete flow entry", "flowId", id, "error", err)
}
// We observed that eBFP PerCPU map might insert multiple times the same key in the map
// (probably due to race conditions) so we need to re-join metrics again at userspace
Expand Down
2 changes: 1 addition & 1 deletion pkg/internal/netolly/ebpf/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func (m *FlowFetcher) LookupAndDeleteMap() map[NetFlowId][]NetFlowMetrics {
// TODO: detect whether LookupAndDelete is supported (Kernel>=4.20) and use it selectively
for iterator.Next(&id, &metrics) {
if err := flowMap.Delete(id); err != nil {
tlog().Warn("couldn't delete flow entry", "flowId", id)
tlog().Debug("couldn't delete flow entry", "flowId", id, "error", err)
}
// We observed that eBFP PerCPU map might insert multiple times the same key in the map
// (probably due to race conditions) so we need to re-join metrics again at userspace
Expand Down

0 comments on commit 845cce3

Please sign in to comment.