trace-chunk: Introduce chunk "path", relayd session "ongoing_rotation", sessiond...
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 12 Dec 2019 17:22:14 +0000 (12:22 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 Dec 2019 23:33:02 +0000 (18:33 -0500)
commita7ceb342d473cc37e00d74c45b04b5378965e055
tree9391ddb3d1762c8d49d52ed0f9113bf424f19f24
parentf8528c7a982be6612eb1d81f17e1badd8910dfd4
trace-chunk: Introduce chunk "path", relayd session "ongoing_rotation", sessiond session "rotated"

This commit introduces new attributes in 3 different structures because
those are used in surrounding areas of the code.

Introduce a trace chunk path attribute which tracks where the chunk
currently keeps its files.

It allows updating the current chunk location with the "rename"
API without having to rely on changing the chunk name override,
which is an attribute we may want to keep using when we archive
the chunk.

Separating the "path" from the "name override" attribute allows
easy manipulation of the chunk output without having to keep the
name override around in the caller code.

Introduce an "ongoing_rotation" relayd session attribute to allow
live viewers to retry while a rotation is ongoing. This ongoing
rotation attribute is introduced in the same commit as the path
chunk attribute because they are used in a surrounding area of the code.

Introduce a "rotated" sessiond session attribute in this commit
because it is used in a surrounding area of the code. This rotated
attribute tracks whether an explicit rotation has been performed
on the session. It is a preparation step for the clear feature,
which will use this to figure out whether it needs to clear the
"root" output path (no rotation prior to clear") or if it needs
to clear to a new path. Before introduction of the clear feature,
a chunk_id of 0 was used to identify this, but because clear will
increment the chunk id without changing the path, we need to track
this explicitly through the "rotated" session flag.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ifdecc66cb4849f3e5f7476ab7db48d8f7532a6d3
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/main.c
src/bin/lttng-relayd/session.h
src/bin/lttng-sessiond/cmd.c
src/bin/lttng-sessiond/session.c
src/bin/lttng-sessiond/session.h
src/common/consumer/consumer.c
src/common/defaults.h
src/common/trace-chunk.c
src/common/trace-chunk.h
This page took 0.027225 seconds and 5 git commands to generate.