code: static SnapshotInfo consolidateSnapshotInfos(Collection<SnapshotInfo> lastSnapshot)
      {
          SnapshotInfo chosen = null;
          if (lastSnapshot != null) {
              Iterator<SnapshotInfo> i = lastSnapshot.iterator();
              while (i.hasNext()) {
                  SnapshotInfo next = i.next();
                  if (chosen == null) {
                      chosen = next;
                  } else if (next.hostId < chosen.hostId) {
                      next.partitionToTxnId.putAll(chosen.partitionToTxnId);
                      chosen = next;
                  }
                  else {
                      // create a full mapping of txn ids to partition ids.
                      chosen.partitionToTxnId.putAll(next.partitionToTxnId);
                  }
              }
          }
          return chosen;
      }
docs: Picks a snapshot info for restore. A single snapshot might have different
  files scattered across multiple machines. All nodes must pick the same
  SnapshotInfo or different nodes will pick different catalogs to restore.
  Pick one SnapshotInfo and consolidate the per-node state into it.