]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
log: cache recent threads up to a day
authorPatrick Donnelly <pdonnell@ibm.com>
Thu, 24 Oct 2024 16:34:29 +0000 (12:34 -0400)
committerMilind Changire <mchangir@redhat.com>
Thu, 14 Nov 2024 03:26:28 +0000 (08:56 +0530)
commit4bc44fbd8e3f1e878ea0b4ec90c384102db55eb9
tree09f4362bf4666a168b91320506750e4d7b257b9a
parente53c2311fdebdfb830b771c608ecb0c10ebf886e
log: cache recent threads up to a day

In general, a pthread implementation reuses thread ids routinely so the
circular_buffer is there to help us see what the thread name was historically
(capped at 4 entries).

However, to guard against this map from growing without bound, discard entries
that are more than a day old. This would happen if a thread logged an Entry and
has since disappeared for more than a day.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit bfe489ed19d599b67cacb0bdd4958f36661248f2)
Signed-off-by: Milind Changire <mchangir@redhat.com>
src/log/Log.cc
src/log/Log.h