From: Amnon Hanuhov Date: Sat, 23 Apr 2022 11:27:08 +0000 (+0300) Subject: crimson/os: Don't limit the amount of returned keys per omap get call X-Git-Tag: v18.0.0~940^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fcf0db1e8f9a7eafe1f2e5f77f1e1d6fdbeba0b5;p=ceph-ci.git crimson/os: Don't limit the amount of returned keys per omap get call Users of `FuturizedStore::omap_get_values()` expect to get all the keys that are currently in the omap, but behind the scenes we were limiting `CyanStore::omap_get_values()` to return only a hardcoded number of values, specifically `MAX_KEYS_PER_OMAP_GET_CALL` which is 32. Signed-off-by: Amnon Hanuhov --- diff --git a/src/crimson/os/cyanstore/cyan_store.cc b/src/crimson/os/cyanstore/cyan_store.cc index f10be4ad1b7..6f4bcef367f 100644 --- a/src/crimson/os/cyanstore/cyan_store.cc +++ b/src/crimson/os/cyanstore/cyan_store.cc @@ -311,7 +311,7 @@ CyanStore::omap_get_values(CollectionRef ch, } omap_values_t values; for (auto i = start ? o->omap.upper_bound(*start) : o->omap.begin(); - values.size() < MAX_KEYS_PER_OMAP_GET_CALL && i != o->omap.end(); + i != o->omap.end(); ++i) { values.insert(*i); } diff --git a/src/crimson/os/cyanstore/cyan_store.h b/src/crimson/os/cyanstore/cyan_store.h index 66ef00b25a2..3d8f72aed43 100644 --- a/src/crimson/os/cyanstore/cyan_store.h +++ b/src/crimson/os/cyanstore/cyan_store.h @@ -27,8 +27,6 @@ namespace crimson::os { class Collection; class CyanStore final : public FuturizedStore { - constexpr static unsigned MAX_KEYS_PER_OMAP_GET_CALL = 32; - const std::string path; std::unordered_map> coll_map; std::map> new_coll_map;