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 negative "others" in Upstream Servers pie chart #1305

Merged
merged 1 commit into from
Feb 18, 2022

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Feb 18, 2022

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


Fix the reference using in the Upstream Servers pie chart. This chart shows how many queries are being sent to the respective destinations. We recently introduced a special category "other" that summarizes everything which does not fall into one of the available categories (like local SERVFAIL). The bug is that we have recently seen reports for negative other shares. This is caused by a wrong reference being used. As Pi-hole is periodically sending one and the same query to multiple upstream servers to probe which one is the fastest. This may cause five queries for only one "real" query. You see where this is leading...

The bugfix simply changes the reference frame from "how many queries we know" to "how many queries we sent". We leave a comment about this in the code for future reference.

@DL6ER DL6ER added the Bugfix label Feb 18, 2022
@DL6ER DL6ER changed the title Prevent negative "others" Fix negative "others" in Upstream Servers pie chart Feb 18, 2022
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/wrong-percent-calculation-in-pie-chart-v2/53599/13

Copy link
Member

@yubiuser yubiuser left a comment

Choose a reason for hiding this comment

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

@yubiuser yubiuser merged commit 08de9d0 into development Feb 18, 2022
@yubiuser yubiuser deleted the fix/negative_others branch February 18, 2022 13:45
@yubiuser yubiuser linked an issue Mar 21, 2022 that may be closed by this pull request
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-15-web-v5-12-and-core-v5-10-released/54987/1

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.

negative percentage in Forward Destination pie chart
3 participants