Skip to content

Commit 24f55b8

Browse files
committed
rgw/rados: fix list_objects_ordered() detection of "forward progress"
for multiple versions of the same object name, ListObjectVersions is supposed to return versions "in the order that they were stored, returning the most recently stored object first" this sort order is preserved by the bucket index in cls_rgw, so list_objects_ordered() should not expect the version ids to be sorted lexicographically. replace the not-less-than comparison with equality Signed-off-by: Casey Bodley <[email protected]>
1 parent 9b02ebf commit 24f55b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rgw/driver/rados/rgw_rados.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,7 @@ int RGWRados::Bucket::List::list_objects_ordered(
18621862
ldpp_dout(dpp, 20) << __func__ <<
18631863
": starting attempt " << attempt << dendl;
18641864

1865-
if (attempt > 1 && !(prev_marker < cur_marker)) {
1865+
if (attempt > 1 && prev_marker == cur_marker) {
18661866
// we've failed to make forward progress
18671867
ldpp_dout(dpp, 0) << "ERROR: " << __func__ <<
18681868
" marker failed to make forward progress; attempt=" << attempt <<

0 commit comments

Comments
 (0)