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

Fixing #5238 - SQL Issues due to non-visible chars #5240

Merged
merged 9 commits into from Feb 20, 2023
Merged

Fixing #5238 - SQL Issues due to non-visible chars #5240

merged 9 commits into from Feb 20, 2023

Conversation

TheWitness
Copy link
Member

Searching for Poller Items Generates SQL Errors

Searching for Poller Items Generates SQL Errors
* On large systems statistics gathering at the beginning of a poller run lead to excessive polling times
* It's important to remove all items from the poller_output table for the poller as it impacts the end of the previous poller
* The other change here has to do with large databases where the poller_output memory table can get pushed into swap.
* Moved statistics out of the internal loop, and made a few optimizations for the $totals query to perform better.
* We only care about total_ports if the snmp_port is > 0
Copy link
Member

@browniebraun browniebraun left a comment

Choose a reason for hiding this comment

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

db_execute('RENAME TABLE poller_output TO poold, po TO poller_output');

I have to verify that at work first, but if I don't have it completely wrong in mind then rename statements for two or more tables were failing with MariaDB 10.3

@TheWitness
Copy link
Member Author

Good comment. I'm still trying to figure out why I'm having poller issues. Made another discovery this morning. Going to add one more minor change to this file.

I'm up for a setting for this as I have no choice but to have this behavior on my 10.5.13 instance. The darn memory tables are being pushed to swap.

@TheWitness
Copy link
Member Author

@netniV, I think a setting is the right way to go per @browniebraun comments.

This is a compromise with regard to a possible issue with MariaDB 10.3 to only allow this via setting, and only allow for single poller systems.

We will look to re-design this in a future Cacti release.
This test added multi-output values that return a NaN or 'U'.
Edit Graph Template link missing base_url.
Template Export missing Graph Template columns multiple and test_source
@netniV netniV merged commit f9816fe into Cacti:1.2.x Feb 20, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants