Fix: do not set quiescent state on channel destroy
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 11 Jun 2019 21:44:56 +0000 (23:44 +0200)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 11 Jun 2019 21:48:20 +0000 (23:48 +0200)
Setting the quiescent state to true for each stream at channel
destruction is not useful: there are no readers left anyway at
that stage.

The side-effect perceived of setting this quiescent state on
destroy is that the metadata stream ends up with an empty last
packet (due to flush_empty performed when setting the quiescent state)
which is never consumed. This shows up in the lttng-modules error
reporting.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/ringbuffer/ring_buffer_frontend.c

index 60725f18e2dbd5c174ca86429dea10f7c138143d..36be1e35dd7be60236fbf869ae09af60c8381a45 100644 (file)
@@ -992,8 +992,6 @@ void *channel_destroy(struct channel *chan)
                                config->cb.buffer_finalize(buf,
                                                           chan->backend.priv,
                                                           cpu);
-                       if (buf->backend.allocated)
-                               lib_ring_buffer_set_quiescent(buf);
                        /*
                         * Perform flush before writing to finalized.
                         */
@@ -1006,8 +1004,6 @@ void *channel_destroy(struct channel *chan)
 
                if (config->cb.buffer_finalize)
                        config->cb.buffer_finalize(buf, chan->backend.priv, -1);
-               if (buf->backend.allocated)
-                       lib_ring_buffer_set_quiescent(buf);
                /*
                 * Perform flush before writing to finalized.
                 */
This page took 0.027121 seconds and 4 git commands to generate.