Skip to content

Commit

Permalink
DLPX-80817 Start_after for blob list doesn't work (openzfs#362)
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Dagnelie <[email protected]>
  • Loading branch information
pcd1193182 authored Apr 21, 2022
1 parent 7053fc4 commit 7805be1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/zfs_object_agent/zettaobject/src/object_access/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,21 @@ impl ObjectAccessTrait for BlobObjectAccess {
})
.await.unwrap();

// XXX The performance of this is likely to be quite bad. We need a better solution. DOSE-1215
let initial = start_after.unwrap_or("".to_string());
if list_prefixes {
if let Some(prefixes) = output.blobs.blob_prefix {
for blob_prefix in prefixes {
yield blob_prefix.name;
if initial < blob_prefix.name {
yield blob_prefix.name;
}
}
}
} else {
for blob in output.blobs.blobs {
yield blob.name;
if initial < blob.name {
yield blob.name;
}
}
}
};
Expand Down

0 comments on commit 7805be1

Please sign in to comment.