This is an automated email from the ASF dual-hosted git repository. chaitalithombare pushed a commit to branch atlas-2.5 in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/atlas-2.5 by this push: new 2ef848e38 ATLAS-4907: Migration status is not updated on file while migration is in progress 2ef848e38 is described below commit 2ef848e382e3205ef310e7604cb29a881a10bc1e Author: chaitalithombare <chaitalithomb...@apache.org> AuthorDate: Wed Jan 8 16:33:35 2025 +0530 ATLAS-4907: Migration status is not updated on file while migration is in progress Signed-off-by: chaitalithombare <chaitalithomb...@apache.org> --- .../repository/migration/DataMigrationStatusService.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/repository/src/main/java/org/apache/atlas/repository/migration/DataMigrationStatusService.java b/repository/src/main/java/org/apache/atlas/repository/migration/DataMigrationStatusService.java index 5b22f9cd5..fc6a06621 100644 --- a/repository/src/main/java/org/apache/atlas/repository/migration/DataMigrationStatusService.java +++ b/repository/src/main/java/org/apache/atlas/repository/migration/DataMigrationStatusService.java @@ -53,14 +53,19 @@ public class DataMigrationStatusService { public void init(String fileToImport) { + String fileHash = null; try { - this.status = new MigrationImportStatus(fileToImport, DigestUtils.md5Hex(new FileInputStream(fileToImport))); + fileHash = DigestUtils.md5Hex(new FileInputStream(fileToImport)); + this.status = new MigrationImportStatus(fileToImport, fileHash); } catch (IOException e) { LOG.error("Not able to create Migration status", e); } - - if (!this.migrationStatusVertexManagement.exists(fileToImport)) { - return; + try { + if (!this.migrationStatusVertexManagement.exists(fileHash)) { + return; + } + } catch (Exception e) { + LOG.error("Not able to find file vertex", e); } getCreate(fileToImport);