[Neo-report] r2771 jm - /trunk/neo/client/app.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue May 31 11:19:17 CEST 2011
Author: jm
Date: Tue May 31 11:19:17 2011
New Revision: 2771
Log:
Revert r2766
Modified:
trunk/neo/client/app.py
Modified: trunk/neo/client/app.py
==============================================================================
--- trunk/neo/client/app.py [iso-8859-1] (original)
+++ trunk/neo/client/app.py [iso-8859-1] Tue May 31 11:19:17 2011
@@ -18,6 +18,7 @@
from cPickle import dumps, loads
from zlib import compress as real_compress, decompress
from neo.lib.locking import Empty
+from random import shuffle
import time
import os
@@ -831,6 +832,10 @@ class Application(object):
ttid = txn_context['ttid']
for partition, oid_list in partition_oid_dict.iteritems():
cell_list = getCellList(partition, readable=True)
+ # We do want to shuffle before getting one with the smallest
+ # key, so that all cells with the same (smallest) key has
+ # identical chance to be chosen.
+ shuffle(cell_list)
# BBB: min(..., key=...) requires Python >= 2.5
cell_list.sort(key=getCellSortKey)
storage_conn = getConnForCell(cell_list[0])
More information about the Neo-report
mailing list