diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java index 165458de9b..06160c50dd 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java @@ -2478,10 +2478,14 @@ public void repairHasLineage(AtlasHasLineageRequests requests) throws AtlasBaseE private void repairHasLineageForAsset(AtlasHasLineageRequest request) { //only supports repairing scenario mentioned here - https://atlanhq.atlassian.net/browse/DG-128?focusedCommentId=20652 + AtlasPerfMetrics.MetricRecorder metricRecorder = RequestContext.get().startMetricRecord("repairHasLineageForAssetGetById"); AtlasVertex assetVertex = AtlasGraphUtilsV2.findByGuid(this.graph, request.getAssetGuid()); + RequestContext.get().endMetricRecord(metricRecorder); if (getEntityHasLineage(assetVertex)) { + metricRecorder = RequestContext.get().startMetricRecord("repairHasLineageForAssetGetRelations"); Iterator lineageEdges = assetVertex.getEdges(AtlasEdgeDirection.BOTH, PROCESS_EDGE_LABELS).iterator(); + RequestContext.get().endMetricRecord(metricRecorder); boolean foundActiveRel = false; while (lineageEdges.hasNext()) {