Commit c6599556 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 233f6eb3
...@@ -109,7 +109,7 @@ class EpollEventManager(object): ...@@ -109,7 +109,7 @@ class EpollEventManager(object):
self.wakeup() self.wakeup()
else: else:
self.epoll.register(fd) self.epoll.register(fd)
self.addReader(conn) # FIXME implicitly adding addReader self.addReader(conn) # FIXME implicitly setting "ready to read"
def unregister(self, conn, close=False): def unregister(self, conn, close=False):
new_pending_processing = [x for x in self._pending_processing new_pending_processing = [x for x in self._pending_processing
......
...@@ -199,7 +199,7 @@ class ReadBuffer(object): ...@@ -199,7 +199,7 @@ class ReadBuffer(object):
keep, let = last_chunk[:to_read], last_chunk[to_read:] keep, let = last_chunk[:to_read], last_chunk[to_read:]
self.content.appendleft(let) self.content.appendleft(let)
chunk_list[-1] = keep chunk_list[-1] = keep
# join all chunks (one copy) // XXX only 1 chunk -> no copy at all # join all chunks (one copy)
data = ''.join(chunk_list) data = ''.join(chunk_list)
assert len(data) == size assert len(data) == size
return data return data
......
...@@ -267,7 +267,7 @@ class Application(BaseApplication): ...@@ -267,7 +267,7 @@ class Application(BaseApplication):
raise RuntimeError("No upstream cluster to backup" raise RuntimeError("No upstream cluster to backup"
" defined in configuration") " defined in configuration")
truncate = Packets.Truncate( truncate = Packets.Truncate(
self.backup_app.provideService()) # NOTE enter to backup main loop self.backup_app.provideService())
except StoppedOperation, e: except StoppedOperation, e:
logging.critical('No longer operational') logging.critical('No longer operational')
truncate = Packets.Truncate(*e.args) if e.args else None truncate = Packets.Truncate(*e.args) if e.args else None
...@@ -522,7 +522,7 @@ class Application(BaseApplication): ...@@ -522,7 +522,7 @@ class Application(BaseApplication):
client_node.send(Packets.AnswerTransactionFinished(ttid, tid), client_node.send(Packets.AnswerTransactionFinished(ttid, tid),
msg_id=txn.getMessageId()) # NOTE msgid: out-of-order answer msg_id=txn.getMessageId()) # NOTE msgid: out-of-order answer
else: else:
# NOTE notifies clients irregardless of whether client was subscribed # NOTE notifies all clients irregardless of whether who was subscribed
client_node.send(invalidate_objects) client_node.send(invalidate_objects)
# Unlock Information to relevant storage nodes. # Unlock Information to relevant storage nodes.
......
...@@ -72,7 +72,7 @@ class AdministrationHandler(MasterHandler): ...@@ -72,7 +72,7 @@ class AdministrationHandler(MasterHandler):
'entering cluster' % (node, )) 'entering cluster' % (node, ))
app._startup_allowed = True app._startup_allowed = True
state = app.cluster_state state = app.cluster_state
elif state == ClusterStates.STARTING_BACKUP: # NOTE elif state == ClusterStates.STARTING_BACKUP:
if app.tm.hasPending() or app.nm.getClientList(True): if app.tm.hasPending() or app.nm.getClientList(True):
raise ProtocolError("Can not switch to %s state with pending" raise ProtocolError("Can not switch to %s state with pending"
" transactions or connected clients" % state) " transactions or connected clients" % 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