private Object getOldKey(Object newKey, RegionEntry entry) throws TypeMismatchException {
    for (Object mapEntry : valueToEntriesMap.entrySet()) {
      Object regionEntries = ((Entry) mapEntry).getValue();
      Object indexKey = ((Entry) mapEntry).getKey();
      // if more than one index key maps to the same RegionEntry that
      // means there has been an in-place modification
      if (TypeUtils.compare(indexKey, newKey, CompiledComparison.TOK_NE).equals(Boolean.TRUE)) {
        if (regionEntries instanceof RegionEntry && regionEntries.equals(entry)) {
          return indexKey;
        } else if (regionEntries instanceof Collection) {
          Collection coll = (Collection) regionEntries;
          if (coll.contains(entry)) {
            return indexKey;
          }
        }
      }
    }
    return newKey;
  }
Find the old key by traversing the forward map in case of in-place update modification If not
found it means the value object was modified with same value. So oldKey is same as newKey.
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/MemoryIndexStore.java