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

[9.0] TBS: set default sampling.tail.storage_limit to 0 but limit disk usage to 90% (backport #15467) #15501

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 31, 2025

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 to 0.
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 behavior
which 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:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

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.

…age to 90% (#15467)

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 to 0.
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 behavior
which limits the tail-sampling database size to sampling.tail.storage_limit
and does not have the new disk usage threshold check.

(cherry picked from commit d019277)

# Conflicts:
#	changelogs/9.0.asciidoc
@mergify mergify bot requested a review from a team as a code owner January 31, 2025 13:01
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Jan 31, 2025
Copy link
Contributor Author

mergify bot commented Jan 31, 2025

Cherry-pick of d019277 has failed:

On branch mergify/bp/9.0/pr-15467
Your branch is up to date with 'origin/9.0'.

You are currently cherry-picking commit d0192778.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   changelogs/all-breaking-changes.asciidoc
	modified:   internal/beater/config/config_test.go
	modified:   internal/beater/config/sampling.go
	modified:   x-pack/apm-server/main.go
	modified:   x-pack/apm-server/sampling/eventstorage/storage_bench_test.go
	modified:   x-pack/apm-server/sampling/eventstorage/storage_manager.go
	modified:   x-pack/apm-server/sampling/eventstorage/storage_manager_bench_test.go
	modified:   x-pack/apm-server/sampling/eventstorage/storage_manager_test.go
	modified:   x-pack/apm-server/sampling/processor_test.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   changelogs/9.0.asciidoc

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@carsonip carsonip requested a review from lahsivjar January 31, 2025 13:19
@mergify mergify bot merged commit 748e058 into 9.0 Jan 31, 2025
17 of 18 checks passed
@mergify mergify bot deleted the mergify/bp/9.0/pr-15467 branch January 31, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport conflicts There is a conflict in the backported pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant