private void waitForCurrentOperations() {
    // Fix for #48066 - make sure that region operations are completely
    // distributed to peers before destroying the region.
    boolean flushOnClose =
        !Boolean.getBoolean(GeodeGlossary.GEMFIRE_PREFIX + "no-flush-on-close"); // test hook
    if (!cache.forcedDisconnect() && flushOnClose
        && getDistributionManager().getDistribution() != null
        && getDistributionManager().getDistribution().isConnected()) {
      distAdvisor.forceNewMembershipVersion();
      try {
        distAdvisor.waitForCurrentOperations();
      } catch (Exception e) {
        // log this but try to close the region so that listeners are invoked
        logger.warn(String.format("%s: error closing region %s", this, getFullPath()), e);
      }
    }
  }
@return true if cacheWrite was performed
geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java