From a025b04c534c916204623503e0173a8e2d4cc4bb Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 11 Mar 2025 12:51:02 -0400 Subject: [PATCH] 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 (cherry picked from commit 24f55b883e5009b032e1c0e91932a01d5d231945) --- src/rgw/driver/rados/rgw_rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/driver/rados/rgw_rados.cc b/src/rgw/driver/rados/rgw_rados.cc index a1370b079dc6b..8b6b9b05e55d4 100644 --- a/src/rgw/driver/rados/rgw_rados.cc +++ b/src/rgw/driver/rados/rgw_rados.cc @@ -1859,7 +1859,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 << -- 2.39.5