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)
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>

No differences found
This page took 0.025358 seconds and 4 git commands to generate.