Fix: get the stream_id when generating live beacons
A message that is not in the archive (sent off-list or not yet received): [email protected]
Forget this patch, I'll send a new version soon.
Need to check the domain before...
Quoted 32 lines · Julien Desfossez
When we send an empty index (beacon), we need to extract the
stream_idto avoid stalling the client on inactive streams on startup.This patch should also be backported to 2.4.x.
Signed-off-by Julien Desfossez <[email protected]>--- src/common/consumer-timer.c | 8 ++++++++ 1 file changed, 8 insertions(+)src/common/consumer-timer.c +8
-0@@ -118,8 +118,16 @@ static int send_empty_index(struct lttng_consumer_stream *stream, uint64_t ts) {int ret;struct ctf_packet_index index; +uint64_t stream_id; + + ret =kernctl_get_stream_id (stream->wait_fd, &stream_id); +if (ret <0 ) { +PERROR ("kernctl_get_stream_id" ); + goto error; + }memset (&index,0 ,sizeof (index)); + index.stream_id =htobe64 (stream_id); index.timestamp_end =htobe64 (ts); ret =consumer_stream_write_index (stream, &index);if (ret <0 ) {