code: func (s *Store) deleteNodeCASTxn(tx *memdb.Txn, idx, cidx uint64, nodeName string) (bool, error) {
  	// Look up the node.
  	node, err := getNodeTxn(tx, nodeName)
  	if err != nil {
  		return false, err
  	}
  	if node == nil {
  		return false, nil
  	}
  
  	// If the existing index does not match the provided CAS
  	// index arg, then we shouldn't update anything and can safely
  	// return early here.
  	if node.ModifyIndex != cidx {
  		return false, nil
  	}
  
  	// Call the actual deletion if the above passed.
  	if err := s.deleteNodeTxn(tx, idx, nodeName); err != nil {
  		return false, err
  	}
  
  	return true, nil
  }
docs: // deleteNodeCASTxn is used to try doing a node delete operation with a given
  // raft index. If the CAS index specified is not equal to the last observed index for
  // the given check, then the call is a noop, otherwise a normal check delete is invoked.