All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH lttng-tools 1/3] Fix: relayd: make viewer streams consider metadata sent
@ 2015-09-03 21:17 Mathieu Desnoyers
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Desnoyers @ 2015-09-03 21:17 UTC (permalink / raw
  To: jgalar; +Cc: lttng-dev

The metadata stream does not use prev seq, and is therefore not sent to
viewers if we depend on prev seq. Use the metadata_received field
instead to achieve the same purpose: if a viewer try to attach to a
session that has not received metadata yet, it will get and error
(metadata stream cannot be found when attaching).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
 src/bin/lttng-relayd/live.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c
index 4586e9b..2d0b687 100644
--- a/src/bin/lttng-relayd/live.c
+++ b/src/bin/lttng-relayd/live.c
@@ -316,8 +316,14 @@ int make_viewer_streams(struct relay_session *session,
 			/*
 			 * Stream has no data, don't consider it yet.
 			 */
-			if (stream->prev_seq == -1ULL) {
-				goto next;
+			if (stream->is_metadata) {
+				if (!stream->metadata_received) {
+					goto next;
+				}
+			} else {
+				if (stream->prev_seq == -1ULL) {
+					goto next;
+				}
 			}
 			vstream = viewer_stream_get_by_id(stream->stream_handle);
 			if (!vstream) {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH lttng-tools 1/3] Fix: relayd: make viewer streams consider metadata sent
       [not found] <1441315050-17271-1-git-send-email-mathieu.desnoyers@efficios.com>
@ 2015-09-05 16:13 ` Jérémie Galarneau
  0 siblings, 0 replies; 2+ messages in thread
From: Jérémie Galarneau @ 2015-09-05 16:13 UTC (permalink / raw
  To: Mathieu Desnoyers; +Cc: lttng-dev@lists.lttng.org, Jeremie Galarneau

Merged, thanks!

Jérémie

On Thu, Sep 3, 2015 at 5:17 PM, Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
> The metadata stream does not use prev seq, and is therefore not sent to
> viewers if we depend on prev seq. Use the metadata_received field
> instead to achieve the same purpose: if a viewer try to attach to a
> session that has not received metadata yet, it will get and error
> (metadata stream cannot be found when attaching).
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> ---
>  src/bin/lttng-relayd/live.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c
> index 4586e9b..2d0b687 100644
> --- a/src/bin/lttng-relayd/live.c
> +++ b/src/bin/lttng-relayd/live.c
> @@ -316,8 +316,14 @@ int make_viewer_streams(struct relay_session *session,
>                         /*
>                          * Stream has no data, don't consider it yet.
>                          */
> -                       if (stream->prev_seq == -1ULL) {
> -                               goto next;
> +                       if (stream->is_metadata) {
> +                               if (!stream->metadata_received) {
> +                                       goto next;
> +                               }
> +                       } else {
> +                               if (stream->prev_seq == -1ULL) {
> +                                       goto next;
> +                               }
>                         }
>                         vstream = viewer_stream_get_by_id(stream->stream_handle);
>                         if (!vstream) {
> --
> 2.1.4
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-05 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-03 21:17 [PATCH lttng-tools 1/3] Fix: relayd: make viewer streams consider metadata sent Mathieu Desnoyers
     [not found] <1441315050-17271-1-git-send-email-mathieu.desnoyers@efficios.com>
2015-09-05 16:13 ` Jérémie Galarneau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.