[Neo-report] r2540 vincent - /trunk/neo/storage/database/mysqldb.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Dec 15 10:04:38 CET 2010


Author: vincent
Date: Wed Dec 15 10:04:38 2010
New Revision: 2540

Log:
Add an XXX about a non-scalable query with MySQL.

This query happens when a storage node joins the cluster, to delete all
rows belonging to partitions it is not assigned to (ex: storage was down
and partition table was reorganised before it rejoined cluster).

Modified:
    trunk/neo/storage/database/mysqldb.py

Modified: trunk/neo/storage/database/mysqldb.py
==============================================================================
--- trunk/neo/storage/database/mysqldb.py [iso-8859-1] (original)
+++ trunk/neo/storage/database/mysqldb.py [iso-8859-1] Wed Dec 15 10:04:38 2010
@@ -416,6 +416,9 @@ class MySQLDatabaseManager(DatabaseManag
         offset_list = ', '.join((str(i) for i in offset_list))
         self.begin()
         try:
+            # XXX: these queries are inefficient (execution time increase with
+            # row count, although we use indexes) when there are rows to
+            # delete. It should be done as an idle task, by chunks.
             self.objQuery('DELETE FROM %%(table)s WHERE partition IN (%s)' %
                 (offset_list, ))
             q("""DELETE FROM trans WHERE partition IN (%s)""" %




More information about the Neo-report mailing list