def askBeginTransaction(self, conn, tid): """ A client request a TID, nothing is kept about it until the finish. """ app = self.app node = app.nm.getByUUID(conn.getUUID()) conn.answer(Packets.AnswerBeginTransaction(app.tm.begin(node, tid)))
def askBeginTransaction(self, conn, tid): """ A client request a TID, nothing is kept about it until the finish. """ app = self.app # Delay new transaction as long as we are waiting for NotifyReady # answers, otherwise we can't know if the client is expected to commit # the transaction in full to all these storage nodes. if app.storage_starting_set: raise DelayEvent node = app.nm.getByUUID(conn.getUUID()) tid = app.tm.begin(node, app.storage_readiness, tid) conn.answer(Packets.AnswerBeginTransaction(tid))
def _makeAnswer(self, msg_id): packet = Packets.AnswerBeginTransaction(self.getNextTID()) packet.setId(msg_id) return packet