From: Jérémie Galarneau Date: Wed, 31 Jul 2019 03:37:39 +0000 (-0400) Subject: Fix: use stream's current tracefile count rather than the max X-Git-Tag: v2.11.0-rc3~91 X-Git-Url: http://git.liburcu.org/?p=lttng-tools.git;a=commitdiff_plain;h=13d934a50a935591277a182b930603ec8284bdc6 Fix: use stream's current tracefile count rather than the max consumer_stream_create_output_files() formats the file name of a stream's data file by passing the tracefile count setting rather than using `tracefile_count_current`, the current "index" within the on-disk ring buffer. This broke the trace file rotation functionality as the same file would be overwritten continuously. Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/consumer/consumer-stream.c b/src/common/consumer/consumer-stream.c index 32441ea2c..fe1178795 100644 --- a/src/common/consumer/consumer-stream.c +++ b/src/common/consumer/consumer-stream.c @@ -576,7 +576,7 @@ int consumer_stream_create_output_files(struct lttng_consumer_stream *stream, ret = utils_stream_file_path(stream->chan->pathname, stream->name, stream->chan->tracefile_size, - stream->chan->tracefile_count, NULL, + stream->tracefile_count_current, NULL, stream_path, sizeof(stream_path)); if (ret < 0) { goto end;