Fix: relayd: rotation pending off-by-one
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 19 Nov 2018 21:09:28 +0000 (16:09 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 12 Dec 2018 19:15:34 +0000 (14:15 -0500)
We need to compare with <= rather than < in the rotation pending
check on the relay daemon side, similarly to the check done in
the consumer daemon check_stream_rotation_pending().

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/main.c

index 09aeb33e0120b4be549a44934efb2f104b4474a9..de14cdb432d977c6fb1fa2cf982e435a5c0063d5 100644 (file)
@@ -2973,7 +2973,7 @@ int relay_rotate_pending(const struct lttcomm_relayd_hdr *recv_hdr,
                        rotate_pending = true;
                        DBG("Stream %" PRIu64 " is still rotating",
                                        stream->stream_handle);
-               } else if (stream->current_chunk_id.value < chunk_id) {
+               } else if (stream->current_chunk_id.value <= chunk_id) {
                        /*
                         * Stream closed on the consumer but still active on the
                         * relay.
This page took 0.034805 seconds and 4 git commands to generate.