fix(restore-indices): Do not fail on MAE row count diff (#5165)

This commit is contained in:
Dexter Lee 2022-06-14 10:12:10 -07:00 committed by GitHub
parent 2dfc166bbd
commit b890ba0d12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,8 +100,8 @@ public class SendMAEStep implements UpgradeStep {
AspectSpec aspectSpec = entitySpec.getAspectSpec(aspectName);
if (aspectSpec == null) {
context.report()
.addLine(String.format("Failed to find aspect with name %s associated with entity named %s",
aspectName, entityName));
.addLine(String.format("Failed to find aspect with name %s associated with entity named %s", aspectName,
entityName));
continue;
}
@ -135,11 +135,7 @@ public class SendMAEStep implements UpgradeStep {
}
}
if (totalRowsMigrated != rowCount) {
context.report()
.addLine(
String.format("Number of MAEs sent %s does not equal the number of input rows %s...", totalRowsMigrated,
rowCount));
return new DefaultUpgradeStepResult(id(), UpgradeStepResult.Result.FAILED);
context.report().addLine(String.format("Failed to send MAEs for %d rows...", rowCount - totalRowsMigrated));
}
return new DefaultUpgradeStepResult(id(), UpgradeStepResult.Result.SUCCEEDED);
};