Commit 9c8502ed authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d48930fe
...@@ -136,8 +136,7 @@ class EpollEventManager(object): ...@@ -136,8 +136,7 @@ class EpollEventManager(object):
if self._closeAcquire(0): if self._closeAcquire(0):
self._closeRelease() self._closeRelease()
# NOTE def isIdle(self): # NOTE
def isIdle(self):
return not (self._pending_processing or self.writer_set) return not (self._pending_processing or self.writer_set)
def _addPendingConnection(self, conn): def _addPendingConnection(self, conn):
......
...@@ -23,8 +23,6 @@ from ..transactions import ConflictError, DelayedError, NotRegisteredError ...@@ -23,8 +23,6 @@ from ..transactions import ConflictError, DelayedError, NotRegisteredError
from ..exception import AlreadyPendingError from ..exception import AlreadyPendingError
import time import time
import traceback
# Log stores taking (incl. lock delays) more than this many seconds. # Log stores taking (incl. lock delays) more than this many seconds.
# Set to None to disable. # Set to None to disable.
SLOW_STORE = 2 SLOW_STORE = 2
...@@ -47,7 +45,6 @@ class ClientOperationHandler(EventHandler): ...@@ -47,7 +45,6 @@ class ClientOperationHandler(EventHandler):
app.queueEvent(self.askObject, conn, (oid, serial, tid)) app.queueEvent(self.askObject, conn, (oid, serial, tid))
return return
o = app.dm.getObject(oid, serial, tid) o = app.dm.getObject(oid, serial, tid)
print 'askObject -> %r' % (o,)
try: try:
serial, next_serial, compression, checksum, data, data_serial = o serial, next_serial, compression, checksum, data, data_serial = o
except TypeError: except TypeError:
...@@ -242,7 +239,6 @@ class ClientROOperationHandler(ClientOperationHandler): ...@@ -242,7 +239,6 @@ class ClientROOperationHandler(ClientOperationHandler):
askVoteTransaction = _readOnly askVoteTransaction = _readOnly
askStoreObject = _readOnly askStoreObject = _readOnly
askFinalTID = _readOnly askFinalTID = _readOnly
# askObjectUndoSerial is used in undo() but itself is read-only query XXX or cut <= backup_tid ?
askCheckCurrentSerial = _readOnly # takes write lock & is only used when going to commit askCheckCurrentSerial = _readOnly # takes write lock & is only used when going to commit
# below operations: like in ClientOperationHandler but cut tid <= backup_tid # below operations: like in ClientOperationHandler but cut tid <= backup_tid
...@@ -284,6 +280,9 @@ class ClientROOperationHandler(ClientOperationHandler): ...@@ -284,6 +280,9 @@ class ClientROOperationHandler(ClientOperationHandler):
tid_list = filter(lambda tid: tid <= backup_tid, tid_list) tid_list = filter(lambda tid: tid <= backup_tid, tid_list)
conn.answer(Packets.AnswerTIDs(tid_list)) conn.answer(Packets.AnswerTIDs(tid_list))
# FIXME askObjectUndoSerial to limit tid <= backup_tid
# (askObjectUndoSerial is used in undo() but itself is read-only query)
# FIXME askObjectHistory to limit tid <= backup_tid # FIXME askObjectHistory to limit tid <= backup_tid
# TODO dm.getObjectHistory has to be first fixed for this # TODO dm.getObjectHistory has to be first fixed for this
#def askObjectHistory(self, conn, oid, first, last): #def askObjectHistory(self, conn, oid, first, last):
...@@ -70,7 +70,6 @@ class IdentificationHandler(EventHandler): ...@@ -70,7 +70,6 @@ class IdentificationHandler(EventHandler):
else: else:
raise ProtocolError('reject non-client-or-storage node') raise ProtocolError('reject non-client-or-storage node')
# apply the handler and set up the connection # apply the handler and set up the connection
print 'S: -> handler: %s' % handler
handler = handler(self.app) handler = handler(self.app)
conn.setHandler(handler) conn.setHandler(handler)
node.setConnection(conn, app.uuid < uuid) node.setConnection(conn, app.uuid < uuid)
......
...@@ -366,7 +366,6 @@ class Replicator(object): ...@@ -366,7 +366,6 @@ class Replicator(object):
node = self.current_node node = self.current_node
if node is not None is node.getUUID(): if node is not None is node.getUUID():
self.cancel() self.cancel()
# NOTE
# Cancel all replication orders from upstream cluster. # Cancel all replication orders from upstream cluster.
for offset in self.replicate_dict.keys(): for offset in self.replicate_dict.keys():
addr, name = self.source_dict.get(offset, (None, None)) addr, name = self.source_dict.get(offset, (None, None))
......
...@@ -34,7 +34,7 @@ class MasterClientHandlerTests(NeoUnitTestBase): ...@@ -34,7 +34,7 @@ class MasterClientHandlerTests(NeoUnitTestBase):
self.app.em = Mock() self.app.em = Mock()
self.app.loid = '\0' * 8 self.app.loid = '\0' * 8
self.app.tm.setLastTID('\0' * 8) self.app.tm.setLastTID('\0' * 8)
self.service = ClientServiceHandler(self.app) # TODO tests for RO handler self.service = ClientServiceHandler(self.app)
# define some variable to simulate client and storage node # define some variable to simulate client and storage node
self.client_port = 11022 self.client_port = 11022
self.storage_port = 10021 self.storage_port = 10021
......
...@@ -751,7 +751,6 @@ class NEOCluster(object): ...@@ -751,7 +751,6 @@ class NEOCluster(object):
self.enableStorageList(storage_list) self.enableStorageList(storage_list)
def newClient(self): def newClient(self):
print '%r: newClient()' % self
return ClientApplication(name=self.name, master_nodes=self.master_nodes, return ClientApplication(name=self.name, master_nodes=self.master_nodes,
compress=self.compress, ssl=self.SSL) compress=self.compress, ssl=self.SSL)
......
...@@ -33,7 +33,6 @@ class DummyObject(Persistent): ...@@ -33,7 +33,6 @@ class DummyObject(Persistent):
def __init__(self, data): def __init__(self, data):
self._data = None self._data = None
# NOTE
class ReplicationBenchmark(BenchmarkRunner): class ReplicationBenchmark(BenchmarkRunner):
""" Test replication process """ """ Test replication process """
......
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