Fix: use stream's current tracefile count rather than the max
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 31 Jul 2019 03:37:39 +0000 (23:37 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 9 Aug 2019 15:28:43 +0000 (11:28 -0400)
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 <jeremie.galarneau@efficios.com>
src/common/consumer/consumer-stream.c

index 32441ea2cd313327cfacf22ab47772f6fea1d39f..fe1178795d9cf6d4f0bc1a300041e74690fcb535 100644 (file)
@@ -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;
This page took 0.025625 seconds and 4 git commands to generate.