private void validateFixedPartitionAttributesAgainstRedundantCopies() {
    for (FixedPartitionAttributesImpl fpa : pr.getFixedPartitionAttributesImpl()) {
      List<FixedPartitionAttributesImpl> allSameFPAs =
          pr.getRegionAdvisor().adviseSameFPAs(fpa);
      allSameFPAs.add(fpa);

      if (!allSameFPAs.isEmpty()) {
        int numSecondaries = 0;
        for (FixedPartitionAttributes otherfpa : allSameFPAs) {
          if (fpa.getNumBuckets() != otherfpa.getNumBuckets()) {
            throw new IllegalStateException(
                String.format(
                    "For region %s,for partition %s, num-buckets are not same (%s, %s)across nodes.",
                    pr.getName(), fpa.getPartitionName(),
                    fpa.getNumBuckets(), otherfpa.getNumBuckets()));
          }

          if (!otherfpa.isPrimary()) {
            if (++numSecondaries > (pr.getRedundantCopies())) {
              throw new IllegalStateException(
                  String.format(
                      "For region %s, number of secondary partitions %s of a partition %s should never exceed number of redundant copies %s.",
                      pr.getName(), numSecondaries,
                      fpa.getPartitionName(), pr.getRedundantCopies()));
            }
          }
        }
      }
    }
  }
Validate that for the given partition, number if secondaries are never exceed redundant copies
defined Validate that the num-buckets defined for a partition are same across all datastores
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionRegionConfigValidator.java