code: func (e *Etcd) tryUpdate(fn func() error) error {
  	err := e.storage.GuaranteedUpdate(context.TODO(), e.baseKey, &api.RangeAllocation{}, true, nil,
  		storage.SimpleUpdate(func(input runtime.Object) (output runtime.Object, err error) {
  			existing := input.(*api.RangeAllocation)
  			if len(existing.ResourceVersion) == 0 {
  				return nil, fmt.Errorf("cannot allocate resources of type %s at this time", e.resource.String())
  			}
  			if existing.ResourceVersion != e.last {
  				if err := e.alloc.Restore(existing.Range, existing.Data); err != nil {
  					return nil, err
  				}
  				if err := fn(); err != nil {
  					return nil, err
  				}
  			}
  			e.last = existing.ResourceVersion
  			rangeSpec, data := e.alloc.Snapshot()
  			existing.Range = rangeSpec
  			existing.Data = data
  			return existing, nil
  		}),
  	)
  	return storeerr.InterpretUpdateError(err, e.resource, "")
  }
docs: // tryUpdate performs a read-update to persist the latest snapshot state of allocation.