]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
log: Make log_max_recent have an effect again. 46736/head
authorJoshua Baergen <jbaergen@digitalocean.com>
Thu, 16 Jun 2022 16:14:12 +0000 (10:14 -0600)
committerJoshua Baergen <jbaergen@digitalocean.com>
Wed, 29 Jun 2022 13:41:34 +0000 (07:41 -0600)
commit3d59ba1671e3e76326fb706a76b8d9638d782924
treee02c82e06782cd20e467701b5cc1ce5879cbc598
parent6ae30f61cd8405616fe39a1ae0c66e78210a90be
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>
src/common/options/global.yaml.in
src/log/Entry.h
src/log/Log.cc
src/log/Log.h