Fix: relayd: don't check for new streams in get packet
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 25 Aug 2015 13:26:30 +0000 (09:26 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 4 Sep 2015 22:43:42 +0000 (18:43 -0400)
Only needed in get next index.

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

index 096c855f6d91eda1110a2382b9cfbe81d42f3ca3..57ff9197ac71a106e90e1500affd24612f6e8b0e 100644 (file)
@@ -1535,23 +1535,6 @@ int viewer_get_packet(struct relay_connection *conn)
        }
 
        pthread_mutex_lock(&vstream->stream->lock);
-       /*
-        * The vstream->stream_fd used here has been opened by
-        * get_next_index. It is opened there because this is what
-        * allows us to grab a reference to the file with stream lock
-        * held, thus protecting us against overwrite caused by
-        * tracefile rotation. Since tracefile rotation unlinks the old
-        * data file, we are ensured that we won't have our data
-        * overwritten under us.
-        */
-       ret = check_new_streams(conn);
-       if (ret < 0) {
-               goto end_free;
-       } else if (ret == 1) {
-               reply.status = htobe32(LTTNG_VIEWER_GET_PACKET_ERR);
-               reply.flags |= LTTNG_VIEWER_FLAG_NEW_STREAM;
-               goto send_reply;
-       }
 
        len = be32toh(get_packet_info.len);
        data = zmalloc(len);
This page took 0.026961 seconds and 4 git commands to generate.