if (currentOwner == null) {
// assign new owner for lost partition
lostCount++;
currentPartition.setPartitionInfo(replicas);
MigrationInfo migrationInfo = new MigrationInfo(partitionId, null, newOwner);
sendMigrationEvent(migrationInfo, MigrationStatus.STARTED);
sendMigrationEvent(migrationInfo, MigrationStatus.COMPLETED);
} else if (newOwner != null && !currentOwner.equals(newOwner)) {
migrationCount++;
MigrationInfo info = new MigrationInfo(partitionId, currentOwner, newOwner);
MigrateTask migrateTask = new MigrateTask(info, new BackupMigrationTask(partitionId, replicas));
boolean offered = migrationQueue.offer(migrateTask);
if(!offered){
logger.severe("Failed to offer: "+migrateTask);
}