This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 978d7f28b22b8d2b7d6c1452b010de76060dceb0
Author: GoGoWen <[email protected]>
AuthorDate: Sun Apr 9 20:04:39 2023 +0800

    [Bugfix](backup) fix show snapshot issue (#17580)
    
    when there is no snapshot, should no result shows.
---
 fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java 
b/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java
index 3ce98c9649..61df65ecc5 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java
@@ -644,8 +644,6 @@ public class Repository implements Writable {
                 info.add(FeConstants.null_string);
                 info.add("ERROR: Failed to get info: " + st.getErrMsg());
             } else {
-                info.add(snapshotName);
-
                 List<String> tmp = Lists.newArrayList();
                 for (RemoteFile file : results) {
                     // __info_2018-04-18-20-11-00.Jdwnd9312sfdn1294343
@@ -657,8 +655,11 @@ public class Repository implements Writable {
                     }
                     tmp.add(disjoinPrefix(PREFIX_JOB_INFO, 
pureFileName.first));
                 }
-                info.add(Joiner.on("\n").join(tmp));
-                info.add(tmp.isEmpty() ? "ERROR: no snapshot" : "OK");
+                if (!tmp.isEmpty()) {
+                    info.add(snapshotName);
+                    info.add(Joiner.on("\n").join(tmp));
+                    info.add("OK");
+                }
             }
         } else {
             // get specified timestamp


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to