Docs: relayd: received metadata position is reset on clear
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Feb 2024 18:20:53 +0000 (13:20 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 1 Mar 2024 19:07:09 +0000 (14:07 -0500)
Correct a comment in the relayd documentation that incorrectly mentioned
the 'sent' position being reset by the 'clear' command.

The correct behavior resets the metadata stream's 'received' position to
'0', not the 'sent' position. The relay daemon expects to re-receive the
metadata contents that matches the previous contents up to the previous
'received' position.

The client, however, does not expect to receive the original contents of
the metadata stream a second time.

Note that from the relay daemon's perspective, a "clear" command does
not exist per se. It is implemented as a stream rotation that moves the
streams from a trace chunk that has an associated 'DELETE' close command
to a new one (which may also be a 'nil' chunk).

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I598fe736c57ab3e934ff0207674d0ecff2bf3e74

src/bin/lttng-relayd/live.cpp

index 416d812a64f2d237238170faa26788fc125e8aea..99037e417c0db58cd76e267383a9f3f7dc1bd068 100644 (file)
@@ -2168,7 +2168,7 @@ static int viewer_get_metadata(struct relay_connection *conn)
                 * status before a stream disappears, otherwise they abort the
                 * entire live connection when receiving an error status.
                 *
-                * Clear feature resets the metadata_sent to 0 until the
+                * Clear feature resets the metadata_received to 0 until the
                 * same metadata is received again.
                 */
                reply.status = htobe32(LTTNG_VIEWER_NO_NEW_METADATA);
This page took 0.026524 seconds and 4 git commands to generate.