]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rados: fix list_objects_ordered() detection of "forward progress"
authorCasey Bodley <cbodley@redhat.com>
Tue, 11 Mar 2025 16:51:02 +0000 (12:51 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 11 Mar 2025 16:51:07 +0000 (12:51 -0400)
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 <cbodley@redhat.com>
src/rgw/driver/rados/rgw_rados.cc

index a55d67aff5bbe14662c784d6cf3e2490e95fb1c4..9afc8e12d378af82043f846d78de58835452c604 100644 (file)
@@ -1862,7 +1862,7 @@ int RGWRados::Bucket::List::list_objects_ordered(
     ldpp_dout(dpp, 20) << __func__ <<
       ": starting attempt " << attempt << dendl;
 
-    if (attempt > 1 && !(prev_marker < cur_marker)) {
+    if (attempt > 1 && prev_marker == cur_marker) {
       // we've failed to make forward progress
       ldpp_dout(dpp, 0) << "ERROR: " << __func__ <<
        " marker failed to make forward progress; attempt=" << attempt <<