Commit 0d7f37ee authored by Julien Muchembled's avatar Julien Muchembled

Revert r2766

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2771 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 43a61e4d
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
from cPickle import dumps, loads from cPickle import dumps, loads
from zlib import compress as real_compress, decompress from zlib import compress as real_compress, decompress
from neo.lib.locking import Empty from neo.lib.locking import Empty
from random import shuffle
import time import time
import os import os
...@@ -831,6 +832,10 @@ class Application(object): ...@@ -831,6 +832,10 @@ class Application(object):
ttid = txn_context['ttid'] ttid = txn_context['ttid']
for partition, oid_list in partition_oid_dict.iteritems(): for partition, oid_list in partition_oid_dict.iteritems():
cell_list = getCellList(partition, readable=True) 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 # BBB: min(..., key=...) requires Python >= 2.5
cell_list.sort(key=getCellSortKey) cell_list.sort(key=getCellSortKey)
storage_conn = getConnForCell(cell_list[0]) storage_conn = getConnForCell(cell_list[0])
......
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