Skip to content

Commit 5a50dc9

Browse files
committed
fix: ensure updateWorkflowStats runs even if final drainAndFlush throws
1 parent cb0a340 commit 5a50dc9

File tree

1 file changed

+5
-2
lines changed
  • openmetadata-service/src/main/java/org/openmetadata/service/apps/bundles/insights/workflows/dataAssets

1 file changed

+5
-2
lines changed

openmetadata-service/src/main/java/org/openmetadata/service/apps/bundles/insights/workflows/dataAssets/DataAssetsWorkflow.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,11 @@ record EntityFuture(EntityInterface entity, Future<Void> future) {}
322322
this.executor = null;
323323
}
324324

325-
drainAndFlush(operationsQueue, contextData);
326-
updateWorkflowStats(source.getName(), source.getStats());
325+
try {
326+
drainAndFlush(operationsQueue, contextData);
327+
} finally {
328+
updateWorkflowStats(source.getName(), source.getStats());
329+
}
327330
}
328331

329332
@SuppressWarnings("unchecked")

0 commit comments

Comments
 (0)