Skip to content

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Mar 10, 2025

The issue is that a random UUID is used as a value of the metrics tag method if the user doesn't set a description on FaultTolerance. These values are always held in memory, so in case more and more FaultTolerance objects without description are created, more and more memory is held.

The fix is relatively simple: in case no description is set (and a random UUID should be used), no metrics are emitted. This is technically a breaking change, but it's better to require users to explicitly state the value of the metrics tag than to leak memory.

The issue is that a random UUID is used as a value of the metrics tag `method`
if the user doesn't set a description on `FaultTolerance`. These values are
always held in memory, so in case more and more `FaultTolerance` objects
without description are created, more and more memory is held.

The fix is relatively simple: in case no description is set (and a random UUID
should be used), no metrics are emitted. This is technically a breaking change,
but it's better to require users to explicitly state the value of the metrics tag
than to leak memory.
@Ladicek Ladicek added this to the 6.4.2 milestone Mar 10, 2025
@Ladicek Ladicek merged commit 4aa93bd into smallrye:6.4 Mar 10, 2025
13 checks passed
@Ladicek Ladicek deleted the fix-memory-leak-in-metrics-6.4 branch March 10, 2025 15:27
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.

1 participant