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

[v23.3.x] [CORE-96]: admin/server fix set_log_level handling of overlapping expirations #18438

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #18397

andijcr added 5 commits May 13, 2024 14:57
_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 v23.3.x-next milestone May 13, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label May 13, 2024
@vbotbuildovich vbotbuildovich requested a review from andijcr May 13, 2024 14:57
@piyushredpanda
Copy link
Contributor

Known failures: #18227 and #12897

@piyushredpanda piyushredpanda merged commit c407c60 into redpanda-data:v23.3.x May 19, 2024
15 of 18 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.3.x-next, v23.3.16 May 19, 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.

3 participants