protected void updateIndexOnDestroyOperation(InternalRegion region) {
    if (!isTombstone() && !region.isProxy() && !isInvalid()) {
      IndexManager indexManager = region.getIndexManager();
      if (indexManager != null) {
        try {
          if (isValueNull()) {
            @Released
            Object value = getValueOffHeapOrDiskWithoutFaultIn(region);
            try {
              Object preparedValue = prepareValueForCache(region, value, false);
              _setValue(preparedValue);
              releaseOffHeapRefIfRegionBeingClosedOrDestroyed(region, preparedValue);
            } finally {
              OffHeapHelper.release(value);
            }
          }
          indexManager.updateIndexes(this, IndexManager.REMOVE_ENTRY, IndexProtocol.OTHER_OP);
        } catch (QueryException e) {
          throw new IndexMaintenanceException(e);
        }
      }
    }
  }
@throws EntryNotFoundException if expectedOldValue is not null and is not equal to current
        value
geode-core/src/main/java/org/apache/geode/internal/cache/entries/AbstractRegionEntry.java