Merged in master, stable-2.10, stable-2.9, and stable-2.8. Thanks, Jérémie
On 11 May 2017 at 16:00, Mathieu Desnoyers <[email protected]> wrote: > When creating a new channel, the streams being sent to the relayd are > kept invisible to the live client until the "streams_sent" command is > received. This ensures the client does not see a partial stream set. > > This "streams_sent" command needs to be sent on CPU hotplug too, > otherwise the live client handling within relayd is not aware of those > streams (they are never published). > > Signed-off-by: Mathieu Desnoyers <[email protected]> > --- > src/common/consumer/consumer.h | 2 ++ > src/common/kernel-consumer/kernel-consumer.c | 15 +++++++++++++++ > 2 files changed, 17 insertions(+) > > diff --git a/src/common/consumer/consumer.h b/src/common/consumer/consumer.h > index 6a38e50..7375373 100644 > --- a/src/common/consumer/consumer.h > +++ b/src/common/consumer/consumer.h > @@ -224,6 +224,8 @@ struct lttng_consumer_channel { > uint64_t discarded_events; > /* Total number of missed packets due to overwriting (overwrite). */ > uint64_t lost_packets; > + > + bool streams_sent_to_relayd; > }; > > /* > diff --git a/src/common/kernel-consumer/kernel-consumer.c > b/src/common/kernel-consumer/kernel-consumer.c > index 3554b8f..16aeae1 100644 > --- a/src/common/kernel-consumer/kernel-consumer.c > +++ b/src/common/kernel-consumer/kernel-consumer.c > @@ -196,6 +196,7 @@ int lttng_kconsumer_snapshot_channel(uint64_t key, char > *path, > ERR("sending streams sent to relayd"); > goto end_unlock; > } > + channel->streams_sent_to_relayd = true; > } > > ret = kernctl_buffer_flush(stream->wait_fd); > @@ -741,6 +742,19 @@ int lttng_kconsumer_recv_cmd(struct > lttng_consumer_local_data *ctx, > consumer_stream_free(new_stream); > goto end_nosignal; > } > + > + /* > + * If adding an extra stream to an already > + * existing channel (e.g. cpu hotplug), we need > + * to sent the "streams_sent" command to relayd. Fixed this typo (sent -> send) and merged in master, stable-2.10, stable-2.9, and stable-2.8. Thanks! Jérémie > + */ > + if (channel->streams_sent_to_relayd) { > + ret = consumer_send_relayd_streams_sent( > + new_stream->net_seq_idx); > + if (ret < 0) { > + goto end_nosignal; > + } > + } > } > > /* Get the right pipe where the stream will be sent. */ > @@ -834,6 +848,7 @@ int lttng_kconsumer_recv_cmd(struct > lttng_consumer_local_data *ctx, > if (ret < 0) { > goto end_nosignal; > } > + channel->streams_sent_to_relayd = true; > } > break; > } > -- > 2.1.4 > -- Jérémie Galarneau EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
