From 65d0ec3c963bde990d9e3ab65d0d603d793aff0b Mon Sep 17 00:00:00 2001 From: Amnon Hanuhov Date: Wed, 25 Aug 2021 09:22:30 +0300 Subject: [PATCH] crimson/os: Use operator[] in CyanStore when inserting values to object omap std::map::insert() doesn't update the value associated with an existing key, therefore we should use operator[] instead Signed-off-by: Amnon Hanuhov --- src/crimson/os/cyanstore/cyan_store.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crimson/os/cyanstore/cyan_store.cc b/src/crimson/os/cyanstore/cyan_store.cc index 964025234c1..149f87328a1 100644 --- a/src/crimson/os/cyanstore/cyan_store.cc +++ b/src/crimson/os/cyanstore/cyan_store.cc @@ -576,7 +576,7 @@ int CyanStore::_omap_set_values( ObjectRef o = c->get_or_create_object(oid); for (auto &&i: aset) { - o->omap.insert(std::move(i)); + o->omap[std::move(i.first)] = std::move(i.second); } return 0; } -- 2.39.5