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

.

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