Acquire a reference to a session when a timer is active
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 21 Nov 2018 15:30:15 +0000 (10:30 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 10 Dec 2018 20:24:49 +0000 (15:24 -0500)
commit8b0602a9ee1a03ec24ac46d95ec051fb2be0c6e4
tree8d2001ffbcb98c4fa2e489794a7674c0f5d1b844
parent48a86f68b90760c061cbefeec89667b19860c300
Acquire a reference to a session when a timer is active

The timers associated to a session don't directly
reference a session since, up to recently, session
objects were not reference counted. There was
essentially no mechanism in place to prevent a
session from being destroyed while one of its timers
was active.

For this reason, the session was queried by id on
every execution of its timers. However, this did
not prevent the session from being destroyed; it only
allowed the periodic jobs to handle that condition
gracefully.

This change that a reference to the session is held
at all times by periodic jobs that are "in-flight".

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/rotation-thread.c
src/bin/lttng-sessiond/rotation-thread.h
src/bin/lttng-sessiond/timer.c
This page took 0.026505 seconds and 4 git commands to generate.