From c8cf4b9cd5404be4cf374456a3e23afa34cb9037 Mon Sep 17 00:00:00 2001 From: vinhn Date: Tue, 13 Feb 2018 15:19:15 -0800 Subject: [PATCH] Eliminate assumption that existence of an element in a data structure means successful backup --- .../main/java/com/netflix/priam/resources/BackupServlet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priam/src/main/java/com/netflix/priam/resources/BackupServlet.java b/priam/src/main/java/com/netflix/priam/resources/BackupServlet.java index be53c249f..c003ee3d3 100644 --- a/priam/src/main/java/com/netflix/priam/resources/BackupServlet.java +++ b/priam/src/main/java/com/netflix/priam/resources/BackupServlet.java @@ -190,7 +190,7 @@ public Response statusByDate(@PathParam("date") String date) throws Exception { if (metadataLinkedList != null && !metadataLinkedList.isEmpty()) { // backup exist base on requested date, lets fetch more of its metadata BackupMetadata bkupMetadata = metadataLinkedList.get(0); - object.put("Snapshotstatus", true); + object.put("Snapshotstatus", bkupMetadata.getStatus().equals(Status.FINISHED)); String token = bkupMetadata.getToken(); if (token != null && !token.isEmpty()) { object.put("token", bkupMetadata.getToken());