public void recoveryDone(RuntimeException e) {
    recovering = false;
    if (!getPersistedMembers().isEmpty()) {
      ((BucketAdvisor) cacheDistributionAdvisor).setHadPrimary();
    }
    // Make sure any removes that we saw during recovery are applied.
    removeListener(recoveryListener);
    for (PersistentMemberID id : recoveryListener.getRemovedMembers()) {
      removeMember(id);
    }
    if (someMemberRecoveredLatch.getCount() > 0) {
      recoveryException = e;
      someMemberRecoveredLatch.countDown();
    } else if (recoveryException != null) {
      logger.fatal(
          String.format("Unable to recover secondary bucket from disk for region %s bucket %s",
              proxyBucket.getPartitionedRegion().getFullPath(), proxyBucket.getBucketId()),
          e);
    }
  }
A listener to watch for removes during the recovery process. After recovery is done, we know
longer need to worry about removes.
geode-core/src/main/java/org/apache/geode/internal/cache/BucketPersistenceAdvisor.java