Skip to content
Extraits de code Groupes Projets
Valider 1a1a4faf rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

refs #2174 this fixes a segmentation fault issue when requesting > 16k sites,...

refs #2174 this fixes a segmentation fault issue when requesting > 16k sites, still one Seg fault to fix
parent c500a05b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
*/ */
namespace Piwik\DataTable; namespace Piwik\DataTable;
use Piwik\Common;
use Piwik\DataTable; use Piwik\DataTable;
use Piwik\DataTable\Renderer\Console; use Piwik\DataTable\Renderer\Console;
...@@ -299,6 +300,10 @@ class Map implements DataTableInterface ...@@ -299,6 +300,10 @@ class Map implements DataTableInterface
* This function can be used, for example, to smoosh IndexedBySite archive * This function can be used, for example, to smoosh IndexedBySite archive
* query results into one DataTable w/ different rows differentiated by site ID. * query results into one DataTable w/ different rows differentiated by site ID.
* *
* Note: This DataTable/Map will be destroyed and will be no longer usable after the tables have been merged into
* the new dataTable to reduce memory usage. Destroying all DataTables witihn the Map also seems to fix a
* Segmentation Fault that occurred in the AllWebsitesDashboard when having > 16k sites.
*
* @return DataTable|Map * @return DataTable|Map
*/ */
public function mergeChildren() public function mergeChildren()
...@@ -326,7 +331,10 @@ class Map implements DataTableInterface ...@@ -326,7 +331,10 @@ class Map implements DataTableInterface
foreach ($this->getDataTables() as $label => $subTable) { foreach ($this->getDataTables() as $label => $subTable) {
$this->copyRowsAndSetLabel($result, $subTable, $label); $this->copyRowsAndSetLabel($result, $subTable, $label);
Common::destroy($subTable);
} }
$this->array = array();
} }
return $result; return $result;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter