[9.0] TBS: set default sampling.tail.storage_limit
to 0 but limit disk usage to 90% (backport #15467)
#15501
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation/summary
This is a breaking change to the default storage_limit to enable a more user-friendly TBS disk usage handling. This new default will automatically scale with a larger disk.
Change
sampling.tail.storage_limit
default to0
.While
0
means unlimited local tail-sampling database size,it now enforces a max 90% disk usage on the disk where the data directory is located.
Any tail sampling writes after this threshold will be rejected,
similar to what happens when tail-sampling database size exceeds a non-0 storage limit.
Setting
sampling.tail.storage_limit
to non-0 maintains the existing behaviorwhich limits the tail-sampling database size to
sampling.tail.storage_limit
and does not have the new disk usage threshold check.
Checklist
For functional changes, consider:
How to test these changes
Create a tmpfs with various sizes, check for logs as disk threshold is hit.
Related issues
Part of #15450
EA-managed apm-server needs elastic/integrations#12543 to change the default.
This is an automatic backport of pull request #15467 done by Mergify.