Skip to content

Comments

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

Merged
danxuliu merged 2 commits intomainfrom
fix-distributing-staged-stats-when-not-updated-three-times-in-a-row
Feb 19, 2025
Merged

Fix distributing staged stats when not updated three times in a row#14419
danxuliu merged 2 commits intomainfrom
fix-distributing-staged-stats-when-not-updated-three-times-in-a-row

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)

@danxuliu danxuliu merged commit 7c90f55 into main Feb 19, 2025
53 checks passed
@danxuliu danxuliu deleted the fix-distributing-staged-stats-when-not-updated-three-times-in-a-row branch February 19, 2025 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants