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

Fix distributing staged stats when not updated three times in a row #14419

Conversation

danxuliu
Copy link
Member

Follow up to #14095

The stats were supposed to be distributed once they had changed, but in practice they were always distributed, as the packet count is absolute rather than relative. Nevertheless, if the packet count did not change distributing them would have no effect. The problem could appear in the (rare) case of the timestamps not being updated three times in a row, as the distribution algorithm failed if the final timestamp was the same as the initial timestamp (causing NaN to be set for the packets and packets lost).

Due to all that now the staged stats are always distributed before being commited (which is still done when the stats stalled for two seconds), although the distribution exits early if the timestamps did not change.

@danxuliu
Copy link
Member Author

/backport to stable31

@danxuliu
Copy link
Member Author

/backport to stable30

@danxuliu
Copy link
Member Author

/backport to stable29

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The stats were supposed to be distributed once they had changed, but
in practice they were always distributed, as the packet count is
absolute rather than relative. Nevertheless, if the packet count did not
change distributing them would have no effect. The problem could appear
in the (rare) case of the timestamps not being updated three times in a
row, as the distribution algorithm failed if the final timestamp was the
same as the initial timestamp (causing NaN to be set for the packets and
packets lost).

Due to all that now the staged stats are always distributed before being
commited (which is still done when the stats stalled for two seconds),
although the distribution exits early if the timestamps did not change.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu force-pushed the fix-distributing-staged-stats-when-not-updated-three-times-in-a-row branch from 514d68c to 79bd451 Compare February 15, 2025 13:56
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, reverting this commit helped to understand the issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants