private void createAndValidatePersistentConfig() {
    DiskStoreImpl diskStore = getDiskStore();
    if (getDataPolicy().withPersistence() && !getConcurrencyChecksEnabled()
        && supportsConcurrencyChecks()) {
      logger.info(
          "Turning on concurrency checks for region: {} since it has been configured to persist data to disk.",
          getFullPath());
      setConcurrencyChecksEnabled(true);
    }
    if (diskStore != null && getDataPolicy().withPersistence()) {
      String colocatedWith = colocatedWithRegion == null ? "" : colocatedWithRegion.getFullPath();
      PRPersistentConfig config = diskStore.getPersistentPRConfig(getFullPath());
      if (config != null) {
        if (config.getTotalNumBuckets() != getTotalNumberOfBuckets()) {
          Object[] prms = new Object[] {getFullPath(), getTotalNumberOfBuckets(),
              config.getTotalNumBuckets()};
          throw new IllegalStateException(
              String.format(
                  "For partition region %s,total-num-buckets %s should not be changed. Previous configured number is %s.",
                  prms));
        }
        // Make sure we don't change to be colocated with a different region
        // We also can't change from colocated to not colocated without writing
        // a record to disk, so we won't allow that right now either.
        if (!colocatedWith.equals(config.getColocatedWith())) {
          Object[] prms =
              new Object[] {getFullPath(), colocatedWith, config.getColocatedWith()};
          DiskAccessException dae = new DiskAccessException(
              String.format(
                  "A DiskAccessException has occurred while writing to the disk for region %s. The region will be closed.",
                  getFullPath()),
              null, diskStore);
          diskStore.handleDiskAccessException(dae);
          throw new IllegalStateException(
              String.format(
                  "For partition region %s, cannot change colocated-with to \"%s\" because there is persistent data with different colocation. Previous configured value is \"%s\".",
                  prms));
        }
      } else {

        config = new PRPersistentConfig(getTotalNumberOfBuckets(), colocatedWith);
        diskStore.addPersistentPR(getFullPath(), config);
        // Fix for support issue 7870 - the parent region needs to be able
        // to discover that there is a persistent colocated child region. So
        // if this is a child region, persist its config to the parent disk store
        // as well.
        if (colocatedWithRegion != null && colocatedWithRegion.getDiskStore() != null
            && colocatedWithRegion.getDiskStore() != diskStore) {
          colocatedWithRegion.getDiskStore().addPersistentPR(getFullPath(), config);
        }
      }

    }
  }
Monitors when other members that participate in this persistent region are removed and creates
a log entry marking the event.
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java