Exemple #1
0
 def sim_send_requests(self, reqs):
     faulty = (self.size - 1) // 3
     for node in self.nodes:
         for req in reqs:
             node._data.requests.add(req)
             node._data.requests.mark_as_forwarded(req, faulty + 1)
             node._data.requests.set_finalised(req)
             node.ready_for_3pc(ReqKey(req.key))
Exemple #2
0
def sim_send_requests(pool: SimPool, req_count):
    reqs = create_requests(req_count)
    faulty = (pool.size - 1) // 3
    for node in pool.nodes:
        for req in reqs:
            node._data.requests.add(req)
            node._data.requests.mark_as_forwarded(req, faulty + 1)
            node._data.requests.set_finalised(req)
            node.ready_for_3pc(ReqKey(req.key))
Exemple #3
0
    def forward(self, request: Request):
        """
        Forward the specified client REQUEST to the other replicas on this node

        :param request: the REQUEST to propagate
        """
        key = request.key
        num_replicas = self.replicas.num_replicas
        logger.debug('{} forwarding request {} to {} replicas'.format(
            self, key, num_replicas))
        self.replicas.pass_message(ReqKey(key))
        self.monitor.requestUnOrdered(key)
        self.requests.mark_as_forwarded(request, num_replicas)
Exemple #4
0
    def forward(self, request: Request):
        """
        Forward the specified client REQUEST to the other replicas on this node

        :param request: the REQUEST to propagate
        """
        key = request.key
        logger.debug('{} forwarding request {} to replicas'.format(self, key))
        for q in self.msgsToReplicas:
            q.append(ReqKey(*key))

        self.monitor.requestUnOrdered(*key)
        self.requests.flagAsForwarded(request, len(self.msgsToReplicas))
Exemple #5
0
    def forward(self, request: Request):
        """
        Forward the specified client REQUEST to the other replicas on this node

        :param request: the REQUEST to propagate
        """
        key = request.key
        logger.debug('{} forwarding request {} to {} replicas'.format(
            self, key, self.replicas.sum_inbox_len))

        self.replicas.pass_message(ReqKey(*key))
        self.monitor.requestUnOrdered(*key)
        self.requests.flagAsForwarded(request, self.replicas.num_replicas)