code: func (s *Store) EnsureRegistration(idx uint64, req *structs.RegisterRequest) error {
  	tx := s.db.Txn(true)
  	defer tx.Abort()
  
  	if err := s.ensureRegistrationTxn(tx, idx, req); err != nil {
  		return err
  	}
  
  	tx.Commit()
  	return nil
  }
docs: // EnsureRegistration is used to make sure a node, service, and check
  // registration is performed within a single transaction to avoid race
  // conditions on state updates.