[ 
https://issues.apache.org/jira/browse/HDDS-12823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Andika updated HDDS-12823:
-------------------------------
    Description: 
Currently in SnapshotDiffReportOzone#fromProtobuf, 
SnapshotDiffReportProto#getToken when initializing SnapshotDiffReportOzone is 
called regardless whether the token is specified 
(SnapshotDiffReportProto#hasToken). This causes token to be an empty string due 
to the protobuf default value.

If a client wants to list all the snapdiff entries and only check whether the 
token is not null as the termination condition, it will cause the snapdiff list 
to get stuck infinite loop. It's better to set the SnapshotDiffReportOzone 
token to null.

  was:
Currently in SnapshotDiffReportOzone#fromProtobuf, 
SnapshotDiffReportProto#getToken is called regardless whether the token is 
specified (SnapshotDiffReportProto#hasToken). This causes token to be an empty 
string due to the protobuf default value.

If a client wants to list all the snapdiff entries and only check whether the 
token is not null as the termination condition, it will cause the snapdiff list 
 to get stuck infinite loop. It's better to set the SnapshotDiffReportOzone 
token to null.


> SnapshotDiffReportOzone#fromProtobuf empty token handling 
> ----------------------------------------------------------
>
>                 Key: HDDS-12823
>                 URL: https://issues.apache.org/jira/browse/HDDS-12823
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Ivan Andika
>            Priority: Minor
>
> Currently in SnapshotDiffReportOzone#fromProtobuf, 
> SnapshotDiffReportProto#getToken when initializing SnapshotDiffReportOzone is 
> called regardless whether the token is specified 
> (SnapshotDiffReportProto#hasToken). This causes token to be an empty string 
> due to the protobuf default value.
> If a client wants to list all the snapdiff entries and only check whether the 
> token is not null as the termination condition, it will cause the snapdiff 
> list to get stuck infinite loop. It's better to set the 
> SnapshotDiffReportOzone token to null.



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

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

Reply via email to