derecho/view_manager.cpp
/* ------------- 4. Public-Interface methods of ViewManager ------------- */
4. Public-Interface methods of ViewManager
4 . Public - Interface methods of ViewManager
void ViewManager::report_failure(const node_id_t who) {
    int r = curr_view->rank_of(who);
    logger->debug("Node ID {} failure reported; marking suspected[{}]", who, r);
    curr_view->gmsSST->suspected[curr_view->my_rank][r] = true;
    int cnt = 0;
    for(r = 0; r < (int)curr_view->gmsSST->suspected.size(); r++) {
        if(curr_view->gmsSST->suspected[curr_view->my_rank][r]) {
            ++cnt;
        }
    }
    if(cnt >= (curr_view->num_members + 1) / 2) {
        throw derecho_exception("Potential partitioning event: this node is no longer in the majority and must shut down!");
    }
    curr_view->gmsSST->put((char*)std::addressof(curr_view->gmsSST->suspected[0][r]) - curr_view->gmsSST->getBaseAddress(), sizeof(curr_view->gmsSST->suspected[0][r]));
}
void ViewManager :: report_failure ( const node_id_t who ) { int r = curr_view -> rank_of ( who ) ; logger -> debug ( " " , who , r ) ; curr_view -> gmsSST -> suspected [ curr_view -> my_rank ] [ r ] = true ; int cnt = 0 ; for ( r = 0 ; r < ( int ) curr_view -> gmsSST -> suspected . size ( ) ; r ++ ) { if ( curr_view -> gmsSST -> suspected [ curr_view -> my_rank ] [ r ] ) { ++ cnt ; } } if ( cnt >= ( curr_view -> num_members + 1 ) / 2 ) { throw derecho_exception ( " " ) ; } curr_view -> gmsSST -> put ( ( char * ) std :: addressof ( curr_view -> gmsSST -> suspected [ 0 ] [ r ] ) - curr_view -> gmsSST -> getBaseAddress ( ) , sizeof ( curr_view -> gmsSST -> suspected [ 0 ] [ r ] ) ) ; }
4
4 .