uint64_t discarded_events;
/* Total number of missed packets due to overwriting (overwrite). */
uint64_t lost_packets;
+
+ bool streams_sent_to_relayd;
};
/*
* Lock to use the stream FDs since they are used between threads.
*
* This is nested INSIDE the consumer_data lock.
- * This is nested INSIDE the metadata cache lock.
* This is nested INSIDE the channel lock.
* This is nested INSIDE the channel timer lock.
+ * This is nested OUTSIDE the metadata cache lock.
* This is nested OUTSIDE consumer_relayd_sock_pair lock.
*/
pthread_mutex_t lock;
/* Copy of the sequence number of the last packet extracted. */
uint64_t last_sequence_number;
/*
- * FD of the index file for this stream.
+ * Index file object of the index file for this stream.
*/
- int index_fd;
+ struct lttng_index_file *index_file;
/*
* Local pipe to extract data when using splice.
/* Network sequence number. */
uint64_t net_seq_idx;
/* Number of stream associated with this relayd */
- unsigned int refcount;
+ int refcount;
/*
* This flag indicates whether or not we should destroy this object. The
struct lttng_ht *stream_per_chan_id_ht;
};
+/*
+ * Set to nonzero when the consumer is exiting. Updated by signal
+ * handler and thread exit, read by threads.
+ */
+extern volatile int consumer_quit;
+
/*
* Init consumer data structures.
*/