func (f *framework) IncEpoch(ctx context.Context) {
	epoch, ok := ctx.Value(epochKey).(uint64)
	if !ok {
		f.log.Fatalf("Can not find epochKey in IncEpoch")
	}
	err := etcdutil.CASEpoch(f.etcdClient, f.name, epoch, epoch+1)
	if err != nil {
		f.log.Fatalf("task %d Epoch CompareAndSwap(%d, %d) failed: %v",
			f.taskID, epoch+1, epoch, err)
	}
}
// When app code invoke this method on framework, we simply
// update the etcd epoch to next uint64. All nodes should watch
// for epoch and update their local epoch correspondingly.
When app code invoke this method on framework, we simply
update the etcd epoch to next uint64. All nodes should watch
for epoch and update their local epoch correspondingly.
// When app code invoke this method on framework we simply // update the etcd epoch to next uint64 . All nodes should watch // for epoch and update their local epoch correspondingly .
func (f *framework) IncEpoch(ctx context.Context) {
	epoch, ok := ctx.Value(epochKey).(uint64)
	if !ok {
		f.log.Fatalf("Can not find epochKey in IncEpoch")
	}
	err := etcdutil.CASEpoch(f.etcdClient, f.name, epoch, epoch+1)
	if err != nil {
		f.log.Fatalf("task %d Epoch CompareAndSwap(%d, %d) failed: %v",
			f.taskID, epoch+1, epoch, err)
	}
}
func ( f * framework ) IncEpoch ( ctx context . Context ) { epoch , ok := ctx . Value ( epochKey ) . ( uint64 ) if ! ok { f . log . Fatalf ( " " ) } err := etcdutil . CASEpoch ( f . etcdClient , f . name , epoch , epoch + 1 ) if err != nil { f . log . Fatalf ( " " , f . taskID , epoch + 1 , epoch , err ) } }
When app code invoke this method on framework, we simply
update the etcd epoch to next uint64.
When app code invoke this method on framework we simply update the etcd epoch to next uint64 .