]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/SnapManager: fix std::string constructed from 0 57312/head
authorZhang Song <zhangsong02@qianxin.com>
Mon, 4 Mar 2024 03:15:52 +0000 (11:15 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 7 May 2024 09:59:10 +0000 (12:59 +0300)
Signed-off-by: Zhang Song <zhangsong02@qianxin.com>
(cherry picked from commit 4c62ae3dccabfd96a50472b05911b4f9cd4743ab)

src/osd/SnapMapper.cc

index 1d3bfa95b9a61e110bf97da7f3ffc7d81d013878..4c8494a19f6f5d4b6c12cde4e608b57affe5815c 100644 (file)
@@ -147,7 +147,7 @@ int OSDriver::get_next_or_current(
     ch, hoid, FuturizedStore::Shard::omap_keys_t{key}
   ).safe_then([&key, next_or_current] (FuturizedStore::Shard::omap_values_t&& vals) {
     assert(vals.size() == 1);
-    *next_or_current = std::make_pair(key, std::move(vals[0]));
+    *next_or_current = std::make_pair(key, std::move(vals.begin()->second));
     return 0;
   }, FuturizedStore::Shard::read_errorator::all_same_way(
     [next_or_current, &key, this] {