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

[v24.1.x] [CORE-96]: admin/server fix set_log_level handling of overlapping expirations #18437

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #18397

_log_level_resets is a map<str, level_reset>, we want to extract the
next expiring level_reset to rearm the _log_level_timer.

previously we would extract the min_element based on the key (the logger
name)

so this sequence of actions
set log-level kafka trace 10
set log-level raft trace 10

only kafka would be expired, because once expired the next run would
pick again kafka, see that there is no expiration, and not rearm the
timer.

(cherry picked from commit bf6bc91)
the test shows that this sequence of actions

set log-level admin-api-server trace 10
set log-level raft trace 10

works and both logger are reset after the expiry period

(cherry picked from commit 6593dbe)
previously, this sequence of actions

set log-level raft trace 10
set log-level raft error 0

would result in raft logging at error level for only 10 seconds, despite
the legit request to expire never.

this is because in the code, the second request would not correctly
reset the expire field if a previous name-level_reset was already in the
map used for this operation

(cherry picked from commit d781fb1)
test that
set log-level admin_api_server trace 10
set log-level admin_api_server error 0

never resets the logger to the info level

(cherry picked from commit 84748a8)
@vbotbuildovich vbotbuildovich added this to the v24.1.x-next milestone May 13, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label May 13, 2024
@piyushredpanda
Copy link
Contributor

/ci-repeat

@andijcr andijcr merged commit 721cd6e into redpanda-data:v24.1.x May 24, 2024
19 checks passed
@BenPope BenPope modified the milestones: v24.1.x-next, v24.1.4 May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants