]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/SnapManager: fix std::string constructed from 0 55910/head
authorZhang Song <zhangsong02@qianxin.com>
Mon, 4 Mar 2024 03:15:52 +0000 (11:15 +0800)
committerZhang Song <zhangsong02@qianxin.com>
Mon, 4 Mar 2024 03:15:52 +0000 (11:15 +0800)
Signed-off-by: Zhang Song <zhangsong02@qianxin.com>
src/osd/SnapMapper.cc

index e79bc5d450a2402de76a1568ad57d9354fb94c5d..fa31cd76a368edbdd89003e7a1184c42902a1e2a 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] {