You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug #1882 was fixed by introducing the StepMeter Contract and doing a closing rollover. This fixed the original issue but #3750 introduced a polling thread that rolls the step meters at the start of the step. These 2 fixes combined produce a grey area where publishing is happening at the middle of the step and the registry closes. In this scenario, the data accumulated for the current step will be lost and will be never reported.
Environment
Micrometer version - 1.11.0
Micrometer registry - StepMeterRegistry
To Reproduce
How to reproduce the bug:
Use any Step registry for testing,
start the registry and create an increment counter every second.
close the registry exactly during publishing.
If the step is 60 seconds and the counter is incremented every second, it will report a value of 60 for every step. If the registry publishes at the 30th second and closes also happens at the 30th second, then publishing will be skipped as there is already publishing that is in progress. Also, the closingRollOver will be skipped as the data is already getting published. The publish will report a value of 60 (the value for the last step) and the data for the current step will never be published.
Expected behavior
Data for the current step should be published on close and publish happening simultaneously.
The text was updated successfully, but these errors were encountered:
lenin-jaganathan
changed the title
Publishing on shutdown doesn't work when publishing is in progress
Publishing on shutdown causes dataloss for unpublished steps.
May 30, 2023
lenin-jaganathan
changed the title
Publishing on shutdown causes dataloss for unpublished steps.
Publishing on shutdown doesn't work when publishing is in progress
May 30, 2023
shakuzen
changed the title
Publishing on shutdown doesn't work when publishing is in progress
Current step data is not published on shutdown when publishing is in progress
May 31, 2023
If a scheduled publish is in progress when `close` is called, `StepMeterRegistry` was not performing the closing rollover and was not doing a subsequent publish of the final partial step.
Wait for the in-progress publish to finish before the closing rollover is called, which is followed by a final publish of the partial step.
Fixesmicrometer-metricsgh-3846
Describe the bug
#1882 was fixed by introducing the StepMeter Contract and doing a closing rollover. This fixed the original issue but #3750 introduced a polling thread that rolls the step meters at the start of the step. These 2 fixes combined produce a grey area where publishing is happening at the middle of the step and the registry closes. In this scenario, the data accumulated for the current step will be lost and will be never reported.
Environment
To Reproduce
How to reproduce the bug:
Use any Step registry for testing,
If the step is 60 seconds and the counter is incremented every second, it will report a value of 60 for every step. If the registry publishes at the 30th second and closes also happens at the 30th second, then publishing will be skipped as there is already publishing that is in progress. Also, the closingRollOver will be skipped as the data is already getting published. The publish will report a value of 60 (the value for the last step) and the data for the current step will never be published.
Expected behavior
Data for the current step should be published on close and publish happening simultaneously.
The text was updated successfully, but these errors were encountered: