]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/multisite: handle case when empty marker is provided 40585/head
authorYuval Lifshitz <ylifshit@redhat.com>
Sun, 4 Apr 2021 14:19:03 +0000 (17:19 +0300)
committerYuval Lifshitz <ylifshit@redhat.com>
Sun, 4 Apr 2021 14:19:03 +0000 (17:19 +0300)
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>
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 };