Skip to content

Commit

Permalink
fix logging for pre update routing (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaoMaWHU authored Sep 13, 2024
1 parent af454f2 commit 4c91222
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public static class AspectUpdateLambda<ASPECT extends RecordTemplate> {
protected UrnPathExtractor<URN> _urnPathExtractor;

private LambdaFunctionRegistry _lambdaFunctionRegistry;
private RestliPreUpdateAspectRegistry _restliPreUpdateAspectRegistry;
private RestliPreUpdateAspectRegistry _restliPreUpdateAspectRegistry = null;

// Maps an aspect class to the corresponding retention policy
private final Map<Class<? extends RecordTemplate>, Retention> _aspectRetentionMap = new HashMap<>();
Expand Down Expand Up @@ -856,7 +856,6 @@ public <ASPECT extends RecordTemplate> ASPECT add(@Nonnull URN urn, @Nonnull ASP
ingestionParams == null || !ingestionParams.hasTestMode() ? new IngestionParams().setIngestionMode(
IngestionMode.LIVE).setTestMode(false) : ingestionParams;
ASPECT updatedAspect = preUpdateRouting(urn, newValue);
log.info("PreUpdateRouting completed in BaseLocalDao, urn: {}, updated aspect: {}", urn, updatedAspect);
return add(urn, (Class<ASPECT>) newValue.getClass(), ignored -> updatedAspect, auditStamp, trackingContext, nonNullIngestionParams);
}

Expand Down Expand Up @@ -1658,6 +1657,7 @@ protected <ASPECT extends RecordTemplate> ASPECT preUpdateRouting(URN urn, ASPEC
Message updatedAspect =
client.routingLambda(client.convertUrnToMessage(urn), client.convertAspectToMessage(newValue));
RecordTemplate convertedAspect = client.convertAspectToRecordTemplate(updatedAspect);
log.info("PreUpdateRouting completed in BaseLocalDao, urn: {}, updated aspect: {}", urn, convertedAspect);
return (ASPECT) convertedAspect;
}
return newValue;
Expand Down

0 comments on commit 4c91222

Please sign in to comment.