On Thu, Apr 09, 2009 at 05:49:49PM +0200, Dietmar Maurer wrote:
> > > > need for locks.  An example of why not is creation of a resource
> > > called
> > > > "datasetA".
> > > >
> > > > 3 nodes:
> > > > node A sends "create datasetA"
> > > > node B sends "create datasetA"
> > > > node C sends "create datasetA"
> > > >
> > > > Only one of those nodes create dataset will arrive first.  The
> > > > remainder
> > > > will arrive second and third.  Also, vs requires that each node
> > sends
> > > > in
> > > > the same order so it may be something like on all nodes:
> > > > B received, C received, A received.
> > > >
> > > > In this case, B creates the dataset, C says "dataset exists" A
> says
> > > > "dataset exists".  All nodes see this same ordering
> 
> But how does a node gets its initial state?? When a node joins it does
> not know the
> state of the other nodes, but it receives state change messages from
> other nodes. A distributed state machine only works if a node knows the
> state before joining the group.
> 
> Is there a 'standard' solution to that problem?

There is no standard solution AFAIK.  I've done it two different ways:

1. Have an old cpg member (e.g. the one with the lowest nodeid) send messages
containing the state to the new node after it's joined.  These "sync messages"
are separate from the messages used to read/write the replicated state during
normal operation.

2. Have an old cpg member write all the state to a checkpoint (see saCkpt)
when a node joins, it sends a message to the new node when it's done writing
indicating that the checkpoint is ready, and the new node then reads the state
from the checkpoint.

There are probably other ways of doing this as well.

If new, normal read/write messages to the replicated state continue while the
new node is syncing the pre-existing state, the new node needs to save those
operations to apply after it's synced.

Dave

_______________________________________________
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to