Commit 895d7801 authored by Julien Muchembled's avatar Julien Muchembled

Fix PartitionTable.filled()

parent 95fecbfb
......@@ -194,6 +194,7 @@ class PartitionTable(object):
for cell in row:
if cell.getNode() == node:
row.remove(cell)
self.num_filled_rows -= not row
if not cell.isFeeding():
self.count_dict[node] -= 1
break
......
......@@ -136,6 +136,7 @@ class PartitionTable(neo.lib.pt.PartitionTable):
self.count_dict[cell.getNode()] += 1
for node in node_list:
self.count_dict.pop(node, None)
self.num_filled_rows = len(filter(None, self.partition_list))
return change_list
def load(self, ptid, row_list, nm):
......@@ -278,6 +279,7 @@ class PartitionTable(neo.lib.pt.PartitionTable):
state = CellStates.DISCARDED
row.remove(cell)
changed_list.append((offset, cell.getUUID(), state))
assert self.num_filled_rows == len(filter(None, self.partition_list))
return changed_list
def outdate(self, lost_node=None):
......
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