cxorm edited a comment on issue #385: HDDS-2779. Fix list volume for --start 
parameter
URL: https://github.com/apache/hadoop-ozone/pull/385#issuecomment-571139586
 
 
   > > I found that if we set `--start` with the last volume,
   > > the list will contain all volumes instead of empty result (like the 
`--start` behavior in listing buckets).
   > > Would we fix it ? (or the behavior makes sense ?)
   > 
   > Thanks @cxorm for digging it. Yes, we should fix it.
   > If we set `--start` with the last volume, the result should be an empty 
list.
   
   Thanks @nandakumar131 for the comment.
   
   I think the `currentValue` in this 
[line](https://github.com/apache/hadoop-ozone/blob/master/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/ObjectStore.java#L304)
 remaining `null` if and only if we get empty list in this 
[line](https://github.com/apache/hadoop-ozone/blob/master/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/ObjectStore.java#L297).
   
   The first round of `hasNext()` is called and enter the `if statement` (cause 
the empty-list), and then execute `currentIterator = 
getNextListOfVolumes(null).iterator();` that resulting in listing all volumes.
   
   So fix was addressed this part. (The same as listing buckets, I'm going to 
create a Jira for it.)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to