]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os: Don't limit the amount of returned keys per omap get call
authorAmnon Hanuhov <AmnonSWE@gmail.com>
Sat, 23 Apr 2022 11:27:08 +0000 (14:27 +0300)
committerAmnon Hanuhov <AmnonSWE@gmail.com>
Sat, 23 Apr 2022 12:24:12 +0000 (15:24 +0300)
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 <AmnonSWE@gmail.com>
src/crimson/os/cyanstore/cyan_store.cc
src/crimson/os/cyanstore/cyan_store.h

index f10be4ad1b7baa588b9080990bf08ebe0c71510c..6f4bcef367f237431bd8a2846485c78cab7fb188 100644 (file)
@@ -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);
   }
index 66ef00b25a2ad46f05987faef878383fd25cc92b..3d8f72aed433e1247bfca20b7fe5d98b29bc7cc6 100644 (file)
@@ -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_t, boost::intrusive_ptr<Collection>> coll_map;
   std::map<coll_t, boost::intrusive_ptr<Collection>> new_coll_map;