From: Joshua Baergen Date: Thu, 16 Jun 2022 16:14:12 +0000 (-0600) Subject: log: Make log_max_recent have an effect again. X-Git-Tag: v16.2.15~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F48311%2Fhead;p=ceph.git log: Make log_max_recent have an effect again. The log improvements in a747aeac13daf3dba43343120659e802cb569f6b unfortunately left log_max_recent broken because m_max_recent wasn't used anymore. Eliminate m_max_recent and set the capacity of the m_recent ring buffer when log_max_recent changes. In order to call set_capacity(), ConcreteEntry needed its move constructor set noexcept. I haven't followed the boost code all the way down but I suspect that setting the ring buffer capacity to anything less than 1 entry will probably cause problems, so restrict log_max_recent to >=1. Also fix a wrong variable used for printing the max new entries during "log dump". Signed-off-by: Joshua Baergen (cherry picked from commit 3d59ba1671e3e76326fb706a76b8d9638d782924) Conflicts: - file: src/common/options/global.yaml.in desc: file not exists in pacific - file: src/common/options.cc desc: added 'set_min' for log_max_recent --- diff --git a/src/common/options.cc b/src/common/options.cc index c9cb4b8d75f4..d3f0166ffb18 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -597,6 +597,7 @@ std::vector