From 3b16476a9b2015e59bb869cdeb07975b8d1ec6c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 30 Jul 2019 23:37:39 -0400 Subject: [PATCH] Fix: use stream's current tracefile count rather than the max MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/common/consumer/consumer-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.34.1