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 "<session-name>/<domain>" to
"<session-name>/<session-start-time>-<rotate-end-time>-1/<domain>".
When the rotation starts, the new chunk folder is created immediately
in: "<session-name>/<previous-rotate-start-time>-2/<domain>" 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 <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
20 files changed:
This page took 0.031151 seconds and 4 git commands to generate.