Fix: only perform lttng_consumer_sync_trace_file() in local mode
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 May 2016 22:48:16 +0000 (18:48 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 20 May 2016 20:41:44 +0000 (16:41 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/consumer.c

index 2ab9b2e34dbc4e3f54cc84c74ebd39ad528bb5dd..45c2785b26d8929b5f2c44b27124e4e7df3bbd7c 100644 (file)
@@ -1657,8 +1657,8 @@ ssize_t lttng_consumer_on_read_subbuffer_mmap(
                lttng_sync_file_range(outfd, stream->out_fd_offset, len,
                                SYNC_FILE_RANGE_WRITE);
                stream->out_fd_offset += len;
+               lttng_consumer_sync_trace_file(stream, orig_offset);
        }
-       lttng_consumer_sync_trace_file(stream, orig_offset);
 
 write_error:
        /*
@@ -1869,7 +1869,9 @@ ssize_t lttng_consumer_on_read_subbuffer_splice(
                stream->output_written += ret_splice;
                written += ret_splice;
        }
-       lttng_consumer_sync_trace_file(stream, orig_offset);
+       if (!relayd) {
+               lttng_consumer_sync_trace_file(stream, orig_offset);
+       }
        goto end;
 
 write_error:
This page took 0.033301 seconds and 4 git commands to generate.