Skip to content

Commit

Permalink
fix(log): change log level from error to debug when we failed to dele…
Browse files Browse the repository at this point in the history
…te a key in conntrack (#916)

# Description

In a high connection churn environment, this log entry can clutter
Retina’s logs without providing actionable insights. Since it does not
impact Retina’s operation, it is safe to reduce its logging level to
debug.

## Related Issue

If this pull request is related to any issue, please mention it here.
Additionally, make sure that the issue is assigned to you before
submitting this pull request.

## Checklist

- [ ] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [ ] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [ ] I have correctly attributed the author(s) of the code.
- [ ] I have tested the changes locally.
- [ ] I have followed the project's style guidelines.
- [ ] I have updated the documentation, if necessary.
- [ ] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.

## Additional Notes

Add any additional notes or context about the pull request here.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.
  • Loading branch information
nddq authored Oct 30, 2024
1 parent a0f8574 commit f992766
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/plugin/conntrack/conntrack_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ func (ct *Conntrack) Run(ctx context.Context) error {
// Delete the conntrack entries
for _, key := range keysToDelete {
if err := ct.ctMap.Delete(key); err != nil {
ct.l.Error("Delete failed", zap.Error(err))
// Should only happen in a high connection churn scenario
ct.l.Debug("Delete failed", zap.Error(err))
} else {
entriesDeleted++
}
Expand Down

0 comments on commit f992766

Please sign in to comment.