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

TimeLagSeries function fix #499

Merged

Conversation

nick-demianchuk
Copy link

@nick-demianchuk nick-demianchuk commented Dec 20, 2023

What issue is this change attempting to solve?

TimeSeriesLag function calculates time-based lag (e.g. for Kafka offsets) based on two offsets metrics - consumer and producer.

Currently the lag function has a bug that produces negative values in some cases.
image

This MR simplifies and updates the logic of the function, and fixes this bug.

How does this change solve the problem? Why is this the best approach?

Code changes make the logic of lag calculation more understandable and account for the bug that was producing the negative values

How can we be sure this works as expected?

Additional tests were added, broken tests were fixed

@deniszh deniszh merged commit 4030828 into bookingcom:master Dec 20, 2023
3 checks passed
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.

3 participants