-
-
Notifications
You must be signed in to change notification settings - Fork 438
Closed
Labels
Milestone
Description
Describe the bug
Review poller_boost.php function output_rrd_data
If there is more old arch tables, instead of processing directly to rrd files, it tries to copy everything to the latest arch table.
Considering customer has two 300G old poller_output_boost_arch_* tables, this would take for ever.
$more_arch_tables = db_fetch_assoc_prepared("SELECT table_name AS name
FROM information_schema.tables
WHERE table_schema = SCHEMA()
AND table_name LIKE 'poller_output_boost_arch_%'
AND table_name != ?
AND table_rows > 0", array($archive_table));
if (cacti_count($more_arch_tables)) {
foreach($more_arch_tables as $table) {
$table_name = $table['name'];
$rows = db_fetch_cell("SELECT count(local_data_id) FROM $table_name");
if (is_numeric($rows) && intval($rows) > 0) {
db_execute("INSERT INTO $archive_table SELECT * FROM $table_name");
db_execute("TRUNCATE TABLE $table_name");
}
}
}
Reactions are currently unavailable