private void removeOldConflatedEntry(Long oldPosition)
        throws CacheException, InterruptedException {
      synchronized (this) {
        Conflatable conflatable = (Conflatable) owningQueue.region.get(oldPosition);
        if (owningQueue.destroyFromAvailableIDsAndRegion(oldPosition)) {
          if (counters != null) {
            counters.remove(oldPosition);
          }
          // <HA overflow>
          if (conflatable instanceof HAEventWrapper) {
            owningQueue.decAndRemoveFromHAContainer((HAEventWrapper) conflatable,
                "Remove Old Conflated Entry");
          }
          // </HA overflow>
          // update statistics

          // Fix for bug 39291:
          // Since markers are always conflated regardless of the conflation
          // setting and they are not normal (are internal) events, we should
          // not bump the events-conflated stat for markers.
          if (!(conflatable instanceof ClientMarkerMessageImpl)) {
            owningQueue.stats.incEventsConflated();
          } else {
            owningQueue.stats.incMarkerEventsConflated();
          }
        }
      }
    }
Destroys the the old entry ( which got replaced by the new entry due to conflation) from the
availableIDs , Region & Counters set. Since this is executed within a sync block by the new
entry thread, it is guaranteed that the old entry thread will exit first , placing the
position etc in the available IDs set. Also the new entry thread & old entry thread are
belonging to different ThreadIdentifier objects & hence hold different
DispatchedAndCurrentEvents object.
geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java