From: Julien Desfossez Date: Mon, 18 Dec 2017 19:45:56 +0000 (-0500) Subject: Rotate command X-Git-Tag: v2.11.0-rc1~344 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=5c408ad8ef08a226c018702aca969536f36ac4e5;hp=5c408ad8ef08a226c018702aca969536f36ac4e5;p=lttng-tools.git Rotate command This is the core of the session rotation command in the session daemon, no client interface for now. For each channel in the session, we send a request to the related consumer to rotate the channel and add that channel key and domain in the channel_pending_rotate_ht HT. When the consumer has finished the rotation of all the streams in the channel, it sends back a notification. The rotation thread in the session daemon looks up the channel information in the HT and finds the corresponding session. When all channels of a session have finished, the rotation thread asks the consumer to rename the chunk folder to append the timestamp of the end of the rotation. On the first rotation, we have an extra step to change the session directory layout from "/" to "/--1/". When the rotation starts, the new chunk folder is created immediately in: "/-2/" so we won't have to move the domain folder(s) after the next rotate has finished, just rename the chunk folder. The "mkdir" and "rename" commands are all propagated to the relay if needed, only the rotate_pending check on the relay is not part of this patch. Signed-off-by: Julien Desfossez Signed-off-by: Jérémie Galarneau ---