]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/multisite: fix sync_error_trim command. 59347/head
authorShilpa Jagannath <smanjara@redhat.com>
Wed, 4 Oct 2023 19:22:41 +0000 (15:22 -0400)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Tue, 20 Aug 2024 12:48:18 +0000 (19:48 +0700)
without --marker option, we trim everthing.
if --marker option is passed in, we trim upto that marker.

Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
(cherry picked from commit a0491a4f63885be9ea14a15c67cabd8903f19641)

src/rgw/rgw_admin.cc

index a8dfce96e4e612d4c674bc65370dad6751f79566..823fc65dbdf15bab5af12f71a76f013d141cc588 100644 (file)
@@ -8978,13 +8978,16 @@ next:
       return -EINVAL;
     }
     if (!start_marker.empty()) {
-      std::cerr << "end-date not allowed." << std::endl;
+      std::cerr << "start-marker not allowed." << std::endl;
       return -EINVAL;
     }
     if (!end_marker.empty()) {
-      std::cerr << "end-date not allowed." << std::endl;
+      std::cerr << "end_marker not allowed." << std::endl;
       return -EINVAL;
     }
+    if (marker.empty()) {
+      marker = "9"; // trims everything
+    }
 
     if (shard_id < 0) {
       shard_id = 0;