code: func (ssa *SQLStorageAuthority) RevokeAuthorizationsByDomain2(ctx context.Context, req *sapb.RevokeAuthorizationsByDomainRequest) (*corepb.Empty, error) {
  	finalRevoked, pendingRevoked, err := ssa.RevokeAuthorizationsByDomain(
  		ctx,
  		core.AcmeIdentifier{
  			Type:  core.IdentifierDNS,
  			Value: *req.Domain,
  		})
  	if err != nil {
  		return nil, err
  	}
  
  	var revokedTotal int64 = finalRevoked + pendingRevoked
  	for {
  		var ids []int64
  		ids, err := ssa.getAuthorizationIDsByDomain2(ctx, *req.Domain)
  		if err != nil {
  			if err == sql.ErrNoRows {
  				break
  			}
  			return nil, err
  		}
  		if len(ids) == 0 {
  			break
  		}
  		if err = ssa.revokeAuthorizations2(ctx, ids); err != nil {
  			return nil, err
  		}
  		revokedTotal += int64(len(ids))
  	}
  	// If no authorizations were revoked return a NotFoundError so that the caller
  	// can decide whether that was an expected result or not. Some callers (e.g.
  	// the admin-revoker tool) may wish to handle this case specifically.
  	if revokedTotal == 0 {
  		return nil, berrors.NotFoundError(
  			"no authorizations to revoke for %q", *req.Domain)
  	}
  	return &corepb.Empty{}, nil
  }
docs: // RevokeAuthorizationsByDomain2 invalidates all pending or valid authorizations for a
  // specific domain. This method is intended to deprecate RevokeAuthorizationsByDomain.