From a7710b4313a391dc6bc45562b3b8dcaa8ca4820c Mon Sep 17 00:00:00 2001 From: Nikhil P Bonte Date: Mon, 23 Oct 2023 13:11:37 +0530 Subject: [PATCH] Logging --- .../atlas/repository/store/graph/v2/AtlasEntityStoreV2.java | 4 ++++ 1 file changed, 4 insertions(+) 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()) {