Fix relayd: stream index file created in the wrong directory
This fix addresses an issue that can cause a stream's index
file to be created in the wrong trace archive chunk's
directory.
The data connection creates a stream's first index file.
This can happen _after_ a ROTATE_STREAM command. More specifically,
the data of the first packet of a stream can be received after a
ROTATE_STREAM command.
The ROTATE_STREAM command changes the streams path_name to point to
the "next" chunk. If a rotation is pending for a stream, as
indicated by "rotate_at_seq_num != -1ULL", it means that we are still
receiving data that belongs in the stream's former path.
In fact, we may have never received any data for this stream at this
point.
In this specific case, we must ensure that the index file is created
in the streams's former path, "prev_path_name", on reception of the
first packet's data on the data connection.
All other rotations beyond the first one are not affected by this
problem since the actual rotation operation creates the new chunk's
index file.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.026729 seconds and 4 git commands to generate.