Adapt `src.ctf.lttng-live` to current API
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 4 Mar 2019 16:02:10 +0000 (11:02 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 2 May 2019 20:50:15 +0000 (20:50 +0000)
commit14f28187e519647f5e358d3d605b8864524f90d6
tree85f80913b6f7a33440c77f4b89f6f526cb3e1866
parent0d2d7e51d3280b67a5ce118ef4545ebb77e09aab
Adapt `src.ctf.lttng-live` to current API

A `src.ctf.lttng-live` component now ensures the monotonic ordering of
the timestamps its outgoing messages. The component can receive messages
from multiples viewer session (UST 64bit, UST 32bit and/or Kernel) that
in turn may contain one or more traces that in turn may contain one or
more streams of messages. Messages from all these streams have to be
ordered into a single flow of messages where every message has a
timestamp equal or larger than the previous one.. This muxing is done by
tracking the next message of each of the live stream iterator and
returning the message with the smallest timestamp.

The live viewer sessions and everything required to get data and
metadata from the LTTng Relay daemon are now owned by the message
iterator and not the component as it was before.

Parameters
==========
The `url` mandatory string parameter controls the URL of the LTTng Relay
Daemon to which the component should register to received traces.

The `session-not-found-action` optional string parameter controls the
behavior of the component in case the requested session is not
configured on the LTTng Relay Daemon. The three accepted value of this
parameter are: "continue", "fail", and "end".

  continue: The message iterator will try to connect (or reconnect) to
  the requested session for ever.

  fail: The message iterator will return an ERROR status if the session
  is not available at the message iterator initialization stage and
  return END status when the session is no longer available.

  end: The message iterator always returns END status if the session is
  not found or is no longer available.

The `session-not-found-action` defaults to "continue" if not specified.

Future improvement
==================
Using a priority queue to order the messages would speed up the muxing
of messages.

Known limitation
================
If a new live stream iterator returns a message that has a timestamp
smaller (that happened before) than the last message forwarded
downstream but the `src.ctf.lttng-live` message iterator. The message
iterator will return with an error status. I am not sure if this
situation can happen in a single host configuration (which is the only
supported configuration).

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
12 files changed:
plugins/ctf/Makefile.am
plugins/ctf/lttng-live/Makefile.am
plugins/ctf/lttng-live/data-stream.c
plugins/ctf/lttng-live/data-stream.h
plugins/ctf/lttng-live/lttng-live-internal.h [deleted file]
plugins/ctf/lttng-live/lttng-live.c
plugins/ctf/lttng-live/lttng-live.h [new file with mode: 0644]
plugins/ctf/lttng-live/metadata.c
plugins/ctf/lttng-live/metadata.h
plugins/ctf/lttng-live/viewer-connection.c
plugins/ctf/lttng-live/viewer-connection.h
plugins/ctf/plugin.c
This page took 0.026031 seconds and 4 git commands to generate.