]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
log: Make log_max_recent have an effect again. 48310/head
authorJoshua Baergen <jbaergen@digitalocean.com>
Thu, 16 Jun 2022 16:14:12 +0000 (10:14 -0600)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Tue, 8 Oct 2024 18:46:28 +0000 (01:46 +0700)
commit9a9f8949b31cd1ca4fb9fda2c696bb6e6e19f65b
treebd36b17201ecf98884bacd184045ba773cfeb55a
parent2813fd3a847bbca614e0de306d725278f9f0ad87
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 <jbaergen@digitalocean.com>
(cherry picked from commit 3d59ba1671e3e76326fb706a76b8d9638d782924)
src/common/options/global.yaml.in
src/log/Entry.h
src/log/Log.cc
src/log/Log.h