Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in a large cluster, there are better chances that the OSD fails to trim the cached osdmap in a timely manner. and sometimes, it is just unable to keep up with the incoming osdmap, so the osdmap cache can keep building up to over 250GB in size. in this change * publish_superblock() before trimming the osdmaps, so other osdmap consumers of OSDService.superblock won't access the osdmaps being removed. * trim all stale osdmaps in batch of conf->osd_target_transaction_size without enforcing an upper bound of max(conf->osd_target_transaction_size, m->get_last() - m->get_first()) we had before. * always use dedicated transaction(s) for trimming osdmaps. so even in the normal case where we are able to trim all stale osdmaps in a single batch, a separated transaction is used. we can piggy back the commits for removing maps, but we keep it this way for simplicity. * use std::min() instead MIN() for type safety Fixes: ceph#13990 Signed-off-by: Kefu Chai <kchai@redhat.com>
- Loading branch information