config.cc
static void *
heartbeatthread(void *x)
{
  config *r = (config *) x;
  r->heartbeater();
  return 0;
}
// The config module maintains views. As a node joins or leaves a
// view, the next view will be the same as previous view, except with
// the new node added or removed. The first view contains only node
// 1. If node 2 joins after the first node (it will download the views
// from node 1), it will learn about view 1 with the first node as the
// only member.  It will then invoke Paxos to create the next view.
// It will tell Paxos to ask the nodes in view 1 to agree on the value
// {1, 2}.  If Paxos returns success, then it moves to view 2 with
// {1,2} as the members. When node 3 joins, the config module runs
// Paxos with the nodes in view 2 and the proposed value to be
// {1,2,3}. And so on.  When a node discovers that some node of the
// current view is not responding, it kicks off Paxos to propose a new
// value (the current view minus the node that isn't responding). The
// config module uses Paxos to create a total order of views, and it
// is ensured that the majority of the previous view agrees to the
// next view.  The Paxos log contains all the values (i.e., views)
// agreed on.
//
// The RSM module informs config to add nodes. The config module
// runs a heartbeater thread that checks in with nodes.  If a node
// doesn't respond, the config module will invoke Paxos's proposer to
// remove the node.  Higher layers will learn about this change when a
// Paxos acceptor accepts the new proposed value through
// paxos_commit().
//
// To be able to bring other nodes up to date to the latest formed
// view, each node will have a complete history of all view numbers
// and their values that it knows about. At any time a node can reboot
// and when it re-joins, it may be many views behind; by remembering
// all views, the other nodes can bring this re-joined node up to
// date.
The config module maintains views. As a node joins or leaves a
view, the next view will be the same as previous view, except with
the new node added or removed. The first view contains only node
1. If node 2 joins after the first node (it will download the views
from node 1), it will learn about view 1 with the first node as the
only member.  It will then invoke Paxos to create the next view.
It will tell Paxos to ask the nodes in view 1 to agree on the value
{1, 2}.  If Paxos returns success, then it moves to view 2 with
{1,2} as the members. When node 3 joins, the config module runs
Paxos with the nodes in view 2 and the proposed value to be
{1,2,3}. And so on.  When a node discovers that some node of the
current view is not responding, it kicks off Paxos to propose a new
value (the current view minus the node that isn't responding). The
config module uses Paxos to create a total order of views, and it
is ensured that the majority of the previous view agrees to the
next view.  The Paxos log contains all the values
agreed on.

The RSM module informs config to add nodes. The config module
runs a heartbeater thread that checks in with nodes.  If a node
doesn't respond, the config module will invoke Paxos's proposer to
remove the node.  Higher layers will learn about this change when a
Paxos acceptor accepts the new proposed value through
paxos_commit().

To be able to bring other nodes up to date to the latest formed
view, each node will have a complete history of all view numbers
and their values that it knows about. At any time a node can reboot
and when it re-joins, it may be many views behind; by remembering
all views, the other nodes can bring this re-joined node up to
date.
The config module maintains views . As a node joins or leaves a view the next view will be the same as previous view except with the new node added or removed . The first view contains only node 1 . If node 2 joins after the first node ( it will download the views from node 1 ) it will learn about view 1 with the first node as the only member . It will then invoke Paxos to create the next view . It will tell Paxos to ask the nodes in view 1 to agree on the value { 1 2 } . If Paxos returns success then it moves to view 2 with { 1 2 } as the members . When node 3 joins the config module runs Paxos with the nodes in view 2 and the proposed value to be { 1 2 3 } . And so on . When a node discovers that some node of the current view is not responding it kicks off Paxos to propose a new value ( the current view minus the node that isn ' t responding ) . The config module uses Paxos to create a total order of views and it is ensured that the majority of the previous view agrees to the next view . The Paxos log contains all the values agreed on . The RSM module informs config to add nodes . The config module runs a heartbeater thread that checks in with nodes . If a node doesn ' t respond the config module will invoke Paxos ' s proposer to remove the node . Higher layers will learn about this change when a Paxos acceptor accepts the new proposed value through paxos_commit () . To be able to bring other nodes up to date to the latest formed view each node will have a complete history of all view numbers and their values that it knows about . At any time a node can reboot and when it re - joins it may be many views behind ; by remembering all views the other nodes can bring this re - joined node up to date .
static void *
heartbeatthread(void *x)
{
  config *r = (config *) x;
  r->heartbeater();
  return 0;
}
static void * heartbeatthread ( void * x ) { config * r = ( config * ) x ; r -> heartbeater ( ) ; return 0 ; }
The config module maintains views.
The config module maintains views .