[lttng-dev] [PATCH lttng-tools v2] Fix: wrong use of the relay_streams_sent in snapshot

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Aug 24 15:15:59 UTC 2017


If you remove this, I think the streams will never get published
within the relayd. (publish_connection_local_streams()). Is this
an expected side-effect ? It should be documented in the changelog.
My guess is that we indeed don't want to publish the snapshot
streams to the viewers.

The reason for doing this change should also be documented. What
behavior is unwanted here from a relayd perspective ?

Thanks,

Mathieu

----- On Aug 23, 2017, at 1:48 PM, Julien Desfossez jdesfossez at efficios.com wrote:

> The relay_streams_sent message is only useful in live sessions and
> should only be sent after all the streams of a channel have been sent.
> 
> Here we were sending this message every time we sent a stream to the
> relay during a snapshot which makes no sense.
> 
> Signed-off-by: Julien Desfossez <jdesfossez at efficios.com>
> ---
> src/common/kernel-consumer/kernel-consumer.c | 8 --------
> src/common/ust-consumer/ust-consumer.c       | 6 ------
> 2 files changed, 14 deletions(-)
> 
> diff --git a/src/common/kernel-consumer/kernel-consumer.c
> b/src/common/kernel-consumer/kernel-consumer.c
> index a5dcc66..1c2751b 100644
> --- a/src/common/kernel-consumer/kernel-consumer.c
> +++ b/src/common/kernel-consumer/kernel-consumer.c
> @@ -187,14 +187,6 @@ int lttng_kconsumer_snapshot_channel(uint64_t key, char
> *path,
> 			DBG("Kernel consumer snapshot stream %s/%s (%" PRIu64 ")",
> 					path, stream->name, stream->key);
> 		}
> -		if (relayd_id != -1ULL) {
> -			ret = consumer_send_relayd_streams_sent(relayd_id);
> -			if (ret < 0) {
> -				ERR("sending streams sent to relayd");
> -				goto end_unlock;
> -			}
> -			channel->streams_sent_to_relayd = true;
> -		}
> 
> 		ret = kernctl_buffer_flush_empty(stream->wait_fd);
> 		if (ret < 0) {
> diff --git a/src/common/ust-consumer/ust-consumer.c
> b/src/common/ust-consumer/ust-consumer.c
> index 366f855..bce7db8 100644
> --- a/src/common/ust-consumer/ust-consumer.c
> +++ b/src/common/ust-consumer/ust-consumer.c
> @@ -1101,12 +1101,6 @@ static int snapshot_channel(uint64_t key, char *path,
> uint64_t relayd_id,
> 			DBG("UST consumer snapshot stream %s/%s (%" PRIu64 ")", path,
> 					stream->name, stream->key);
> 		}
> -		if (relayd_id != -1ULL) {
> -			ret = consumer_send_relayd_streams_sent(relayd_id);
> -			if (ret < 0) {
> -				goto error_unlock;
> -			}
> -		}
> 
> 		/*
> 		 * If tracing is active, we want to perform a "full" buffer flush.
> --
> 2.7.4
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list