From: Mathieu Desnoyers Date: Thu, 12 Dec 2019 17:22:14 +0000 (-0500) Subject: trace-chunk: Introduce chunk "path", relayd session "ongoing_rotation", sessiond... X-Git-Tag: v2.12.0-rc1~127 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=a7ceb342d473cc37e00d74c45b04b5378965e055;hp=a7ceb342d473cc37e00d74c45b04b5378965e055;p=lttng-tools.git 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 Change-Id: Ifdecc66cb4849f3e5f7476ab7db48d8f7532a6d3 Signed-off-by: Jérémie Galarneau ---