Commit dde50609 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove those assertions since the debugging stage about node/cell state

inconsistency is finished.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1052 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent ad90889d
......@@ -21,8 +21,7 @@ from neo import logging
from neo import protocol
from neo.protocol import RUNNING_STATE, TEMPORARILY_DOWN_STATE, DOWN_STATE, \
BROKEN_STATE, PENDING_STATE, HIDDEN_STATE, MASTER_NODE_TYPE, \
STORAGE_NODE_TYPE, CLIENT_NODE_TYPE, ADMIN_NODE_TYPE, \
VALID_NODE_STATE_LIST
STORAGE_NODE_TYPE, CLIENT_NODE_TYPE, ADMIN_NODE_TYPE
from neo.util import dump
class Node(object):
......@@ -45,7 +44,6 @@ class Node(object):
return self.state
def setState(self, new_state):
assert new_state in VALID_NODE_STATE_LIST
if self.state != new_state:
self.state = new_state
self.last_state_change = time()
......
......@@ -19,7 +19,7 @@ from neo import logging
from neo.protocol import UP_TO_DATE_STATE, OUT_OF_DATE_STATE, FEEDING_STATE, \
DISCARDED_STATE, RUNNING_STATE, TEMPORARILY_DOWN_STATE, DOWN_STATE, \
BROKEN_STATE, VALID_CELL_STATE_LIST, HIDDEN_STATE, PENDING_STATE
BROKEN_STATE, HIDDEN_STATE, PENDING_STATE
from neo.util import dump, u64
from neo.locking import RLock
......@@ -29,14 +29,12 @@ class Cell(object):
def __init__(self, node, state = UP_TO_DATE_STATE):
self.node = node
assert state in VALID_CELL_STATE_LIST
self.state = state
def getState(self):
return self.state
def setState(self, state):
assert state in VALID_CELL_STATE_LIST
self.state = state
def getNode(self):
......@@ -126,7 +124,6 @@ class PartitionTable(object):
return index % self.np
def setCell(self, offset, node, state):
assert state in VALID_CELL_STATE_LIST
if state == DISCARDED_STATE:
return self.removeCell(offset, node)
if node.getState() in (BROKEN_STATE, DOWN_STATE):
......
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