Commit 08c5a329 authored by Vincent Pelletier's avatar Vincent Pelletier

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).

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2540 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 33b6cb69
......@@ -416,6 +416,9 @@ class MySQLDatabaseManager(DatabaseManager):
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)""" %
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment