public void remove(RegionEntry entry, Object value) {
      Object object = map.get(entry);
      if (object == null) {
        return;
      }
      if (object instanceof Collection) {
        Collection coll = (Collection) object;
        boolean removed;
        // If its a list query might get ConcurrentModificationException.
        // This can only happen for Null mapped or Undefined entries in a
        // RangeIndex. So we are synchronizing on ArrayList.
        if (useList) {
          synchronized (coll) {
            removed = coll.remove(value);
          }
        } else {
          removed = coll.remove(value);
        }
        if (removed) {
          if (coll.size() == 0) {
            map.remove(entry);
          }
          atomicUpdater.decrementAndGet(this);
        }
      } else {
        if (object.equals(value)) {
          map.remove(entry);
        }
        atomicUpdater.decrementAndGet(this);
      }
    }
We do NOT use any locks here as every remove is for a RegionEntry which is locked before
coming here. No two threads can be entering in this method together for a RegionEntry.
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractIndex.java