]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerPatrick Donnelly <pdonnell@ibm.com>
Thu, 9 Jan 2025 16:17:17 +0000 (11:17 -0500)
commitff4565ac3f2d8c1f32b6dc3b917f4d30b114f1d4
tree79eb1d16895edeeba8a8a585a860bb7718041fdc
parent6255143a06c0d6f84c7c3539a810a8a36f8f97b8
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)
src/log/Log.cc
src/log/Log.h