sadanand48 commented on code in PR #8124:
URL: https://github.com/apache/ozone/pull/8124#discussion_r2043744836
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java:
##########
@@ -422,30 +423,45 @@ public CancelSnapshotDiffResponse cancelSnapshotDiff(
return new CancelSnapshotDiffResponse(reason);
}
- public List<SnapshotDiffJob> getSnapshotDiffJobList(
- String volumeName, String bucketName,
- String jobStatus, boolean listAll) throws IOException {
- List<SnapshotDiffJob> jobList = new ArrayList<>();
+ public ListSnapshotDiffJobResponse getSnapshotDiffJobList(
+ String volumeName,
+ String bucketName,
+ String jobStatus,
+ boolean listAll,
+ String prevDiffJob,
+ int maxEntries) throws IOException {
+ List<SnapshotDiffJob> jobs = new ArrayList<>();
+ String lastSnapshotDiffJob = null;
try (ClosableIterator<Map.Entry<String, SnapshotDiffJob>> iterator =
- snapDiffJobTable.iterator()) {
- while (iterator.hasNext()) {
- SnapshotDiffJob snapshotDiffJob = iterator.next().getValue();
+ snapDiffJobTable.iterator(Optional.ofNullable(prevDiffJob),
Optional.empty())) {
Review Comment:
ok yeah since there are no locks here this can happen.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]