protected Set<Object> processReceivedRVV(RegionVersionVector remoteRVV,
      RegionVersionVector localRVV, RegionVersionVector receivedRVV) {
    if (remoteRVV == null) {
      return null;
    }
    // calculate keys for unfinished ops
    HashSet<Object> keys = new HashSet<>();
    Set<VersionSource> departedMemberSet = receivedRVV.getDepartedMembersSet();
    boolean isPersistentRegion = region.getDataPolicy().withPersistence();
    Set<VersionSource> foundIds;
    if (!isPersistentRegion) {
      foundIds = new HashSet<>();
    } else {
      foundIds = Collections.emptySet();
    }
    if ((isPersistentRegion && localRVV.isNewerThanOrCanFillExceptionsFor(remoteRVV))
        || !departedMemberSet.isEmpty()) {
      // Only search for unfinished keys when localRVV has something newer
      // and the region is persistent region.
      // Search for departed members if region is not persistent region
      Iterator<RegionEntry> it = region.getBestIterator(false);
      int count = 0;
      VersionSource<?> myId = region.getVersionMember();
      while (it.hasNext()) {
        RegionEntry mapEntry = it.next();
        VersionStamp<?> stamp = mapEntry.getVersionStamp();
        VersionSource<?> id = stamp.getMemberID();
        if (id == null) {
          id = myId;
        }
        if (!isPersistentRegion) {
          foundIds.add(id);
        } else if (!remoteRVV.contains(id, stamp.getRegionVersion())) {
          // found an unfinished operation
          keys.add(mapEntry.getKey());
          remoteRVV.recordVersion(id, stamp.getRegionVersion());

          if (count < 10) {
            if (logger.isTraceEnabled(LogMarker.INITIAL_IMAGE_VERBOSE)) {
              logger.trace(LogMarker.INITIAL_IMAGE_VERBOSE,
                  "Region:{} found unfinished operation key={},member={},region version={}",
                  region.getFullPath(), mapEntry.getKey(), stamp.getMemberID(),
                  stamp.getRegionVersion());
            }
          }
          count++;
        }
      }
      if (!keys.isEmpty()) {
        if (logger.isTraceEnabled(LogMarker.INITIAL_IMAGE_VERBOSE)) {
          logger.trace(LogMarker.INITIAL_IMAGE_VERBOSE, "Region:{} found {} unfinished operations",
              region.getFullPath(), keys.size());
        }
      }
    }
    if (!departedMemberSet.isEmpty()) {
      if (localRVV != null) {
        localRVV.removeOldMembers(foundIds);
      }
      receivedRVV.removeOldMembers(foundIds);
      remoteRVV.removeOldMembers(foundIds);
    }
    return keys;
  }
Compare the received RVV with local RVV and return a set of keys for unfinished operations.

@param remoteRVV RVV from provider to be filled with unfinished operations
@param localRVV RVV recovered from disk
@param receivedRVV original RVV from provider to remove departed members
@return set for keys of unfinished operations.
geode-core/src/main/java/org/apache/geode/internal/cache/InitialImageOperation.java