Commit 16e0aefd authored by Grégory Wisniewski's avatar Grégory Wisniewski

Add the ptid parameter to update() method of PartitionTable class for

consistency.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1065 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 74ace0c4
......@@ -225,7 +225,7 @@ class MasterMonitoringEventHandler(MasterBaseEventHandler):
# Ignore this packet.
return
app.ptid = ptid
app.pt.update(cell_list, app.nm)
app.pt.update(ptid, cell_list, app.nm)
def handleSendPartitionTable(self, conn, packet, ptid, row_list):
uuid = conn.getUUID()
......
......@@ -157,7 +157,7 @@ class PrimaryNotificationsHandler(BaseHandler):
# Ignore this packet.
return
app.ptid = ptid
app.pt.update(cell_list, app.nm)
app.pt.update(ptid, cell_list, app.nm)
def handleSendPartitionTable(self, conn, packet, ptid, row_list):
# This handler is in PrimaryBootstrapHandler, since this
......
......@@ -164,7 +164,8 @@ class PartitionTable(object):
# XXX: node manager is given here just to verify that any node in the
# partition table is known, this will be removed when checked.
def update(self, cell_list, nm):
def update(self, ptid, cell_list, nm):
self.id = ptid
for offset, uuid, state in cell_list:
node = nm.getNodeByUUID(uuid)
if node is None:
......
......@@ -83,7 +83,7 @@ class HiddenHandler(BaseMasterHandler):
app.replicator.addPartition(offset)
# update partition table in memory and the database
app.pt.update(cell_list, app.nm)
app.pt.update(ptid, cell_list, app.nm)
app.dm.changePartitionTable(ptid, cell_list)
def handleStartOperation(self, conn, packet):
......
......@@ -55,7 +55,7 @@ class MasterOperationHandler(BaseMasterHandler):
app.replicator.addPartition(offset)
# update partition table in memory and the database
app.pt.update(cell_list, app.nm)
app.pt.update(ptid, cell_list, app.nm)
app.dm.changePartitionTable(ptid, cell_list)
def handleLockInformation(self, conn, packet, tid):
......
......@@ -63,7 +63,7 @@ class VerificationHandler(BaseMasterHandler):
return
app.ptid = ptid
# update partition table in memory and the database
app.pt.update(cell_list, app.nm)
app.pt.update(ptid, cell_list, app.nm)
app.dm.changePartitionTable(ptid, cell_list)
def handleStartOperation(self, conn, packet):
......
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