@Override
    public void toData(DataOutput out,
        SerializationContext context) throws IOException {
      super.toData(out, context);
      out.writeBoolean(profile != null);
      if (profile != null) {
        DataSerializer.writeObject(profile, out);
      }
      if (bucketProfiles == null) {
        out.writeInt(0);
      } else {
        int size = bucketProfiles.size();
        out.writeInt(size);
        for (Object bucketProfile : bucketProfiles) {
          RegionAdvisor.BucketProfileAndId bp =
              (RegionAdvisor.BucketProfileAndId) bucketProfile;
          InternalDataSerializer.invokeToData(bp, out);
        }
      }
      if (eventState != null) {
        out.writeBoolean(true);
        // The isHARegion flag is false here because
        // we currently only include the event state in the profile
        // for bucket regions.
        EventStateHelper.dataSerialize(out, (Map) eventState, false, getSender());
      } else {
        out.writeBoolean(false);
      }
      if (destroyedId != null) {
        out.writeBoolean(true);
        InternalDataSerializer.invokeToData(destroyedId, out);
      } else {
        out.writeBoolean(false);
      }
      out.writeBoolean(skippedCompatibilityChecks);
      out.writeLong(seqKeyForWan);
    }
Added to fix 42051. If the region is in the middle of being destroyed, return the destroyed
profile
geode-core/src/main/java/org/apache/geode/internal/cache/CreateRegionProcessor.java