From 842c8f94a5177d7053bf596d571db9c99df2e4b6 Mon Sep 17 00:00:00 2001 From: Aseem Bansal Date: Mon, 6 Jan 2025 16:39:02 +0530 Subject: [PATCH] fix(ingest/gc): infinite loop query entities (#12274) --- .../datahub/ingestion/source/gc/soft_deleted_entity_cleanup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/gc/soft_deleted_entity_cleanup.py b/metadata-ingestion/src/datahub/ingestion/source/gc/soft_deleted_entity_cleanup.py index cf810d05aa2ca1..32243106bb53f6 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/gc/soft_deleted_entity_cleanup.py +++ b/metadata-ingestion/src/datahub/ingestion/source/gc/soft_deleted_entity_cleanup.py @@ -258,7 +258,7 @@ def _get_soft_deleted_queries(self) -> Iterable[str]: ) break scroll_across_entities = result.get("scrollAcrossEntities") - if not scroll_across_entities: + if not scroll_across_entities or not scroll_across_entities.get("count"): break scroll_id = scroll_across_entities.get("nextScrollId") self.report.num_queries_found += scroll_across_entities.get("count")