Skip to content

Commit

Permalink
Docs: relayd: received metadata position is reset on clear
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: I598fe736c57ab3e934ff0207674d0ecff2bf3e74
  • Loading branch information
jgalar committed Mar 1, 2024
1 parent 76bcac5 commit 0359d56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/lttng-relayd/live.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0359d56

Please sign in to comment.