Consumer rotate stream
authorJulien Desfossez <jdesfossez@efficios.com>
Thu, 14 Dec 2017 18:38:20 +0000 (13:38 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 14 Mar 2018 21:53:11 +0000 (17:53 -0400)
commitd73bf3d793ee0b0c5b56cb47cb50c27d1789d3bd
tree04b915bfa69f7f798c70e02a7bce43a711c9b272
parente2acc8d25bc0073554a2f3e742e070b7034ec1d0
Consumer rotate stream

Perform the action of rotating a stream locally or send the command to
do it on the relayd. Rotating a stream file consists of:
 - closing the current tracefile and index,
 - opening a new tracefile and index in the new chunk folder,
 - resetting the stream rotation flags,
 - updating the counter of streams waiting for a rotation in a channel,

If the stream is a metadata stream, we also need to trigger the action
to re-dump the content of the metadata cache after the rotation has been
performed.

The caller of lttng_consumer_rotate_stream() always calls
consumer_post_rotation() after having released the stream lock to update
the counter of streams waiting for a rotation in a channel and notifying
the session daemon if this counter reaches 0.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/consumer/consumer.c
src/common/consumer/consumer.h
src/common/relayd/relayd.c
src/common/relayd/relayd.h
src/common/sessiond-comm/relayd.h
This page took 0.025402 seconds and 4 git commands to generate.