From 0ba2ae11a06081af5e7ea7f735cc7083fb3d08fc Mon Sep 17 00:00:00 2001 From: Rajdeep Singh Date: Sat, 4 Apr 2026 18:53:35 +0530 Subject: [PATCH] Fixes #27001: Delete pipeline execution history on hard delete When a Pipeline entity was permanently deleted (hardDelete=true), the execution status records in entity_extension_time_series were left behind. Recreating a pipeline with the same name would surface stale historical execution data. Add entityExtensionTimeSeriesDao().delete() call in entitySpecificCleanup() to remove all pipeline status time series records keyed by the pipeline FQN. This mirrors the existing pattern in IngestionPipelineRepository.postDelete() and runs within the same transaction as the rest of the cleanup. --- .../org/openmetadata/service/jdbi3/PipelineRepository.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/PipelineRepository.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/PipelineRepository.java index ee5755cb0f11..8e501622d668 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/PipelineRepository.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/PipelineRepository.java @@ -725,7 +725,12 @@ public void storeEntities(List pipelines) { @Override protected void entitySpecificCleanup(Pipeline pipeline) { - // When a pipeline is removed , the linege needs to be removed + // Delete pipeline execution history from time series + daoCollection + .entityExtensionTimeSeriesDao() + .delete(pipeline.getFullyQualifiedName(), PIPELINE_STATUS_EXTENSION); + + // When a pipeline is removed, the lineage needs to be removed daoCollection .relationshipDAO() .deleteLineageBySourcePipeline(