Commit a54aada5 authored by Julien Muchembled's avatar Julien Muchembled

admin: use 'boostrap' flag to discard partition changes received too early

This should fix the following random failure:

Traceback (most recent call last):
  File "neo/tests/functional/__init__.py", line 140, in start
    execfile(command, {"__name__": "__main__"})
  File "./neoadmin", line 22, in <module>
    main()
  File "neo/scripts/neoadmin.py", line 66, in main
    app.run()
  File "neo/admin/app.py", line 103, in run
    self.em.poll(1)
  File "neo/lib/event.py", line 100, in poll
    to_process.process()
  File "neo/lib/connection.py", line 532, in process
    self._handlers.handle(self, packet)
  File "neo/lib/connection.py", line 158, in handle
    self._handle(connection, packet)
  File "neo/lib/connection.py", line 174, in _handle
    handler.packetReceived(connection, packet)
  File "neo/lib/handler.py", line 93, in packetReceived
    self.dispatch(conn, packet)
  File "neo/admin/handler.py", line 142, in dispatch
    super(MasterEventHandler, self).dispatch(conn, packet)
  File "neo/lib/handler.py", line 57, in dispatch
    method(conn, *args)
  File "neo/admin/handler.py", line 156, in sendPartitionTable
    self.app.pt.load(ptid, row_list, self.app.nm)
  File "neo/lib/pt.py", line 219, in load
    assert node is not None
AssertionError

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2680 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 5917e6e8
......@@ -80,6 +80,7 @@ class Application(object):
registerLiveDebugger(on_log=self.log)
def reset(self):
self.bootstrapped = False
self.master_conn = None
self.master_node = None
......
......@@ -146,10 +146,12 @@ class MasterEventHandler(EventHandler):
neo.lib.logging.debug("answerNodeInformation")
def notifyPartitionChanges(self, conn, ptid, cell_list):
if self.app.bootstrapped:
self.app.pt.update(ptid, cell_list, self.app.nm)
def answerPartitionTable(self, conn, ptid, row_list):
self.app.pt.load(ptid, row_list, self.app.nm)
self.app.bootstrapped = True
def sendPartitionTable(self, conn, ptid, row_list):
self.app.pt.load(ptid, row_list, self.app.nm)
......
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