private void removeDestroyTokensFromCqResultKeys(FilterRoutingInfo filterRouting) {
    for (InternalDistributedMember m : filterRouting.getMembers()) {
      FilterInfo filterInfo = filterRouting.getFilterInfo(m);
      if (filterInfo == null || filterInfo.getCQs() == null) {
        continue;
      }

      CacheProfile cf = (CacheProfile) ((Bucket) getRegion()).getPartitionedRegion()
          .getCacheDistributionAdvisor().getProfile(m);

      if (cf == null || cf.filterProfile == null || cf.filterProfile.isLocalProfile()
          || cf.filterProfile.getCqMap().isEmpty()) {
        continue;
      }

      for (Object value : cf.filterProfile.getCqMap().values()) {
        ServerCQ cq = (ServerCQ) value;

        doRemoveDestroyTokensFromCqResultKeys(filterInfo, cq);
      }
    }
  }
Cleanup destroyed events in CQ result cache for remote CQs. While maintaining the CQ results
key caching. the destroy event keys are marked as destroyed instead of removing them, this is
to take care, arrival of duplicate events. The key marked as destroyed are removed after the
event is placed in clients HAQueue or distributed to the peers.

This is similar to CacheClientNotifier.removeDestroyTokensFromCqResultKeys() where the
destroyed events for local CQs are handled.
geode-core/src/main/java/org/apache/geode/internal/cache/DistributedCacheOperation.java