void validatePartitionAttrsFromPRConfig(PartitionRegionConfig prconf) {
    final PartitionAttributes prconfPA = prconf.getPartitionAttrs();
    final PartitionAttributes userPA = pr.getAttributes().getPartitionAttributes();

    if (userPA.getTotalSize() != prconfPA.getTotalSize()) {
      throw new IllegalStateException(
          String.format(
              "Total size in PartitionAttributes is incompatible with globally set total size. Set the total size to %sMB.",
              prconfPA.getTotalSize()));
    }
    if (userPA.getRedundantCopies() != prconfPA.getRedundantCopies()) {
      throw new IllegalStateException(
          String.format("Requested redundancy %s is incompatible with existing redundancy %s",
              userPA.getRedundantCopies(),
              prconfPA.getRedundantCopies()));
    }

    if (prconf.isFirstDataStoreCreated() && pr.isDataStore()) {
      validateDistributedEvictionAttributes(prconf.getEvictionAttributes());
    }

    Scope prconfScope = prconf.getScope();
    Scope myScope = pr.getScope();
    if (!myScope.equals(prconfScope)) {
      throw new IllegalStateException(
          String.format(
              "Scope in PartitionAttributes is incompatible with already set scope.Set the scope to %s .",
              prconfScope));
    }

    final int prconfTotalNumBuckets = prconfPA.getTotalNumBuckets();
    if (userPA.getTotalNumBuckets() != prconfTotalNumBuckets) {
      throw new IllegalStateException(
          String.format(
              "The total number of buckets found in PartitionAttributes ( %s ) is incompatible with the total number of buckets used by other distributed members. Set the number of buckets to %s",
              userPA.getTotalNumBuckets(),
              prconfTotalNumBuckets));
    }
    validatePartitionListeners(prconf, userPA);
    validatePartitionResolver(prconf, userPA);
    validateColocatedWith(prconf, userPA);
    validateExpirationAttributes(pr.getAttributes(), prconf);
  }
This method validates the PartitionedAttributes that user provided PR Attributes with PR
Attributes set in PR Config obtained from global meta-data allPartitionedRegion region
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionRegionConfigValidator.java