On Wed, Jun 29, 2016 at 03:38:26PM -0700, Andy Zhou wrote:
> This is one possible way to implement reference integrity with etcd:
> 
> * DB wide versioning.
> 
> Assign a key db/version that stores db wide transaction id. Assume the id
> starts with 0. Any client issued transaction on the DB should also include
> this key; A transaction will increase its value by 1; Any etcd client
> transaction
> will always bring this version number from even to an odd number.
> 
> No further transaction can be issued until "db/version"'s value become
> even.
> 
> * A dedicated client enforces referential integrity
> 
> There is a dedicated etcd client whose job is to enforce referential
> integrity.
> It starts to run when the version number is odd, commit the next transaction
> that "fixes"  the etcd.  The version number is increased even if there is
> nothing
> to fix.
> 
> In the HA setup, referential integrity checking clients should run on the
> same machines
> that run etcd. Only the etcd client that runs on the same machine as the
> etcd leader
> will actively enforce referential integrity.  Other clients will be running
> in standby mode,
> and only become active when its local etcd server become the leader.
> 
> Will this work?

I agree with Russell that this sounds really expensive.
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to