Skip to content

Add dedicated retention cap for archived index/search slowlogs - #1047

Open
ash9146 wants to merge 1 commit into
elastic:mainfrom
ash9146:add-slowlog-collection
Open

Add dedicated retention cap for archived index/search slowlogs#1047
ash9146 wants to merge 1 commit into
elastic:mainfrom
ash9146:add-slowlog-collection

Conversation

@ash9146

@ash9146 ash9146 commented Jul 27, 2026

Copy link
Copy Markdown

Closes #1046

Slowlogs were not previously collected with their own retention cap, meaning archived search/indexing slowlogs competed with general *.log.gz archives under the shared maxLogs cap and could be evicted by unrelated log rotation. This adds a dedicated maxSlowLogs setting (default 3) and collects index_search_slowlog and
index_indexing_slowlog archives independently, following the same pattern already used for maxGcLogs.

Live slowlog files are already collected today with no opt-in flag, so this keeps the same always-on behavior and only changes the retention of archived files, rather than introducing a new flag.

Verified manually against a running 8.15.0 node: created 5 dummy search slowlog archives, confirmed only the 3 most recent were collected.

Checklist

  • I have verified that the APIs in this pull request do not return sensitive data

Slowlogs were not previously collected with their own retention cap,
meaning archived search/indexing slowlogs competed with general
*.log.gz archives under the shared maxLogs cap and could be evicted
by unrelated log rotation. This adds a dedicated maxSlowLogs setting
(default 3) and collects index_search_slowlog and
index_indexing_slowlog archives independently, following the same
pattern already used for maxGcLogs.

Live slowlog files are already collected today with no opt-in flag,
so this keeps the same always-on behavior and only changes the
retention of archived files, rather than introducing a new flag.

Verified manually against a running 8.15.0 node: created 5 dummy
search slowlog archives, confirmed only the 3 most recent were
collected.
@ash9146
ash9146 requested review from a team and pickypg as code owners July 27, 2026 01:12
@cla-checker-service

cla-checker-service Bot commented Jul 27, 2026

Copy link
Copy Markdown

💚 CLA has been signed

@ash9146 ash9146 closed this Jul 27, 2026
@ash9146 ash9146 reopened this Jul 27, 2026
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.

[Feature Request] Add dedicated retention cap for archived index/search slowlogs

1 participant