From: Jérémie Galarneau Date: Thu, 10 May 2018 21:14:39 +0000 (-0400) Subject: Initialize relay_stream chunk_id to its session's current trace archive id X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;ds=sidebyside;h=81164b6b222b4bafe1e3cec57c50429ab6dab30f;hp=81164b6b222b4bafe1e3cec57c50429ab6dab30f;p=lttng-tools.git Initialize relay_stream chunk_id to its session's current trace archive id Initializing the relayd's streams with a stream_chunk_id allows the relayd to differentiate between a stream created before the first rotation (at chunk id == 0) vs. a stream that has been created after the last (or pending) rotation. Before this fix, the relayd can fail to identify that a rotation has been completed. This is caused by the fact that a stream's chunk id is initialized to 0 and updated by the RELAYD_ROTATE_STREAM command to the id of the chunk that is currently being rotated. The 'stream->current_chunk_id.value < chunk_id' check performed by the RELAYD_ROTATE_PENDING will cause rotations to never complete for streams that are created between the launch of a rotation and the check for its completion. For example, when the relayd is checking whether the rotation id '3' is completed, it may see streams with the default value of their chunk id set to '0' and determine that a rotation is still pending. Signed-off-by: Jérémie Galarneau ---