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

Correctly deinit logging before reinit when changed on the fly #4151

Merged
merged 1 commit into from
Jan 20, 2024

Conversation

graydon
Copy link
Contributor

@graydon graydon commented Jan 20, 2024

When we set the log level on the fly with, say, an http command ll?partition=tx&level=trace, we update a basic per-partition table and then (re)initialize the rest of the tracing subsystem. Unfortunately this only works correctly if we deinitialize the logging subsystem before reinitializing it (as we do most places where dynamic tracing reconfiguration are allowed). In this one path we fail to deinit before reinit, and this ultimately means the max log level never gets propagated over the rust bridge, and the new tracing facility on the rust side never activates.

(It does activate already if you set the initial log level to trace, just not if you reconfigure on the fly)

Anyway, this change fixes the reconfiguration path to deinit before reinit.

@MonsieurNicolas
Copy link
Contributor

r+ 571083c

@latobarita latobarita merged commit ebd0c4e into master Jan 20, 2024
15 checks passed
@MonsieurNicolas MonsieurNicolas deleted the trace-fixes branch February 27, 2024 18:17
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.

3 participants