Skip to content

Commit 07be8aa

Browse files
author
Jonathan Hui
committed
Moved GeneratedSql() logging post execution
1 parent 99e1380 commit 07be8aa

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalDAO.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,10 @@ private <ASPECT extends RecordTemplate> EbeanMetadataAspect queryLatest(@Nonnul
498498
.orderBy()
499499
.desc(CREATED_ON_COLUMN);
500500
}
501-
501+
502+
results = query.findList();
503+
504+
// Encouraged to run AFTER query execution based on getGeneratedSql() documentation
502505
if (log.isDebugEnabled() && "com.linkedin.dataJob.azkaban.AzkabanFlowInfo".equals(aspectName)) {
503506
log.debug("Using {} retrieval; " + "Generated SQL: {}; urn: {}, aspect: {}, version: {}",
504507
_findMethodology.toString(),
@@ -509,8 +512,6 @@ private <ASPECT extends RecordTemplate> EbeanMetadataAspect queryLatest(@Nonnul
509512
);
510513
}
511514

512-
results = query.findList();
513-
514515
if (results.isEmpty()) {
515516
return null;
516517
}

0 commit comments

Comments
 (0)