You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Siyao Meng (Jira)" <ji...@apache.org> on 2023/06/20 18:18:00 UTC

[jira] [Commented] (HDDS-7953) [snapshot] SnapshotDiff should throw proper responses in case there are no differences to be listed

    [ https://issues.apache.org/jira/browse/HDDS-7953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735407#comment-17735407 ] 

Siyao Meng commented on HDDS-7953:
----------------------------------

As I look into this further and observe how HDFS handles this, it turns out HDFS also prints out empty response with the same header when diff list is empty:

{code}
[systest@nightly-71x-yd-1 ~]$ sudo -u hdfs hdfs snapshotDiff /snap1 s20230620-181318.836 s20230620-181453.211
Difference between snapshot s20230620-181318.836 and snapshot s20230620-181453.211 under directory /snap1:

[systest@nightly-71x-yd-1 ~]$
{code}

As a reference, this is what it looks like for HDFS when the diff list is not empty:

{code}
[systest@nightly-71x-yd-1 ~]$ sudo -u hdfs hdfs snapshotDiff /snap1 s20230620-181259.188 s20230620-181318.836
Difference between snapshot s20230620-181259.188 and snapshot s20230620-181318.836 under directory /snap1:
M	.
+	./key1

[systest@nightly-71x-yd-1 ~]$
{code}

[~jyosin] So I guess if we want the output to be familiar to HDFS users we don't need to change much here. Apart from maybe adding one extra white line.

> [snapshot] SnapshotDiff should throw proper responses in case there are no differences to be listed
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HDDS-7953
>                 URL: https://issues.apache.org/jira/browse/HDDS-7953
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: Ozone Manager
>            Reporter: Jyotirmoy Sinha
>            Assignee: Siyao Meng
>            Priority: Major
>              Labels: ozone-snapshot
>
> SnapshotDiff should throw proper responses in case there are no differences to be listed
> {code:java}
> [root@jspriv01-1 ~]# ozone sh snapshot snapshotDiff vol1/buck1 snap3 snap4
> Difference between snapshot snap3 and snapshot snap4:
> [root@jspriv01-1 ~]# {code}
> The message for above scenario should indicate that there are no differences in the 2 snapshots
> Also, for a case where the source and destination snapshot are both same, it should throw an error stating that both from-to snapshot cannot be same.
> Current behaviour -
> {code:java}
> [root@jspriv01-1 ~]# ozone sh snapshot snapshotDiff vol1/buck1 snap3 snap3
> Difference between snapshot snap3 and snapshot snap3:
> [root@jspriv01-1 ~] {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org