]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/multisite: handle case when empty marker is provided 40559/head
authorYuval Lifshitz <ylifshit@redhat.com>
Sun, 4 Apr 2021 14:19:03 +0000 (17:19 +0300)
committerAdam C. Emerson <aemerson@redhat.com>
Mon, 5 Apr 2021 17:49:52 +0000 (13:49 -0400)
marker is potional, however, it may also be provided empty

Fixes: https://tracker.ceph.com/issues/50135
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
(cherry picked from commit fccf75eee3750a3654d2a2b1e3aa379edcfd8c8d)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_log_backing.h

index d5996049e58739ccd46e5bf9cbe2e3e4f6f187c6..6f755efb46389cd00e015d4b00345cb4bab7f739 100644 (file)
@@ -251,7 +251,7 @@ cursorgen(std::string_view cursor_) {
 
 inline std::pair<uint64_t, std::string_view>
 cursorgeno(std::optional<std::string_view> cursor) {
-  if (cursor) {
+  if (cursor && !cursor->empty()) {
     return cursorgen(*cursor);
   } else {
     return { 0, ""s };