Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update probe logic not to share memory #288

Merged
merged 1 commit into from
Oct 31, 2024
Merged

update probe logic not to share memory #288

merged 1 commit into from
Oct 31, 2024

Conversation

maleck13
Copy link
Collaborator

Running with --race showed we were sharing some memory across routines. I have adjusted the design not to share memory like this now

Signed-off-by: craig [email protected]

rh-pre-commit.version: 2.2.0
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: craig <[email protected]>

rh-pre-commit.version: 2.2.0
rh-pre-commit.check-secrets: ENABLED
@@ -182,7 +149,7 @@ func (w *Probe) performRequest(ctx context.Context, protocol, host, path, ip str
httpReq.Header.Add(h.Name, h.Value)
}

logger.V(1).Info("health: probe executing against ", "url", httpReq.URL)
logger.V(2).Info("health: probe executing against ", "url", httpReq.URL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly the V(2) level cannot be displayed with the way we implemented a logger. It is log.Info for info log.V(1).info for debug level and log.Error() and log.V(1).Error for error level logs. Byt setting it to V(2) we unable to display them 🤔

Copy link
Contributor

@maksymvavilov maksymvavilov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@maleck13
Copy link
Collaborator Author

@maksymvavilov setting go run --zap-log-level=2 seemed to work well

@maleck13 maleck13 added this pull request to the merge queue Oct 31, 2024
Merged via the queue into main with commit 7fea5b8 Oct 31, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants