diff --git a/src/os/DBObjectMap.cc b/src/os/DBObjectMap.cc index 3a878ccb569..08593044b05 100644 --- a/src/os/DBObjectMap.cc +++ b/src/os/DBObjectMap.cc @@ -1089,17 +1089,16 @@ DBObjectMap::Header DBObjectMap::_lookup_map_header( } } - map<string, bufferlist> out; - set<string> to_get; - to_get.insert(map_header_key(oid)); - int r = db->get(HOBJECT_TO_SEQ, to_get, &out); - if (r < 0 || out.empty()) { + bufferlist out; + int r = db->get(HOBJECT_TO_SEQ, map_header_key(oid), &out); + if (r < 0 || out.length()==0) { delete header; return Header(); } Header ret(header, RemoveOnDelete(this)); - bufferlist::iterator iter = out.begin()->second.begin(); + bufferlist::iterator iter = out.begin(); + ret->decode(iter); { Mutex::Locker l(cache_lock);