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, 3 Dec 2018 00:41:01 +0000 (19:41 -0500)
commitc7031a2c707646804e0088d069578d5eb74fc01e
tree7ae3ef66602016f818240db6b467a0d9c1d10088
parente32d7f274604b77bcd83c24994e88df3761ed658
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.027368 seconds and 5 git commands to generate.