}
final Set<Address> unknownAddresses = new HashSet<Address>();
PartitionInfo[] state = partitionState.getPartitions();
for (int partitionId = 0; partitionId < state.length; partitionId++) {
PartitionInfo partitionInfo = state[partitionId];
InternalPartitionImpl currentPartition = partitions[partitionId];
for (int index = 0; index < InternalPartition.MAX_REPLICA_COUNT; index++) {
Address address = partitionInfo.getReplicaAddress(index);
if (address != null && getMember(address) == null) {
if (logger.isFinestEnabled()) {
logger.finest(
"Unknown " + address + " found in partition table sent from master "
+ sender + ". It has probably already left the cluster. Partition: "
+ partitionId);
}
unknownAddresses.add(address);
}
}
// backup replicas will be assigned after active migrations are finalized.
currentPartition.setOwner(partitionInfo.getReplicaAddress(0));
}
if (!unknownAddresses.isEmpty() && logger.isLoggable(Level.WARNING)) {
StringBuilder s = new StringBuilder("Following unknown addresses are found in partition table")
.append(" sent from master[").append(sender).append("].")
.append(" (Probably they have recently joined or left the cluster.)")