Commit e8a423e2 authored by Vincent Pelletier's avatar Vincent Pelletier

master.handlers.client: Fill set on construction rather than later.

Also, drop extraneous parentheses in another set's creation.
parent 7b608b8f
...@@ -59,9 +59,8 @@ class ClientServiceHandler(MasterHandler): ...@@ -59,9 +59,8 @@ class ClientServiceHandler(MasterHandler):
# Collect partitions related to this transaction. # Collect partitions related to this transaction.
getPartition = app.pt.getPartition getPartition = app.pt.getPartition
partition_set = set() partition_set = set(getPartition(oid) for oid in oid_list)
partition_set.add(getPartition(ttid)) partition_set.add(getPartition(ttid))
partition_set.update((getPartition(oid) for oid in oid_list))
# Collect the UUIDs of nodes related to this transaction. # Collect the UUIDs of nodes related to this transaction.
uuid_set = set() uuid_set = set()
...@@ -76,7 +75,7 @@ class ClientServiceHandler(MasterHandler): ...@@ -76,7 +75,7 @@ class ClientServiceHandler(MasterHandler):
raise ProtocolError('No storage node ready for transaction') raise ProtocolError('No storage node ready for transaction')
identified_node_list = app.nm.getIdentifiedList(pool_set=uuid_set) identified_node_list = app.nm.getIdentifiedList(pool_set=uuid_set)
usable_uuid_set = set((x.getUUID() for x in identified_node_list)) usable_uuid_set = set(x.getUUID() for x in identified_node_list)
partitions = app.pt.getPartitions() partitions = app.pt.getPartitions()
peer_id = conn.getPeerId() peer_id = conn.getPeerId()
tid = app.tm.prepare(ttid, partitions, oid_list, usable_uuid_set, tid = app.tm.prepare(ttid, partitions, oid_list, usable_uuid_set,
......
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