From 855060f867357c4ed856d7b5940cf77513f7fccf Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 29 Jan 2013 12:26:09 -0500 Subject: [PATCH 1/1] Fix: remove consumer health poll update on startup With the TLS health state, the consumer thread has to register in order to be validated during the health check so the poll update work around is no longer needed andi replaced with a simple code update just after the health registration of the thread. This has been reported after the TLS feature ticket #411 has been implemented. Fixes #428 Signed-off-by: David Goulet --- src/bin/lttng-sessiond/main.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 74f448a88..84b3f20ed 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -867,24 +867,7 @@ static void *thread_manage_consumer(void *data) health_register(HEALTH_TYPE_CONSUMER); - /* - * Since the consumer thread can be spawned at any moment in time, we init - * the health to a poll status (1, which is a valid health over time). - * When the thread starts, we update here the health to a "code" path being - * an even value so this thread, when reaching a poll wait, does not - * trigger an error with an even value. - * - * Here is the use case we avoid. - * - * +1: the first poll update during initialization (main()) - * +2 * x: multiple code update once in this thread. - * +1: poll wait in this thread (being a good health state). - * == even number which after the wait period shows as a bad health. - * - * In a nutshell, the following poll update to the health state brings back - * the state to an even value meaning a code path. - */ - health_poll_update(); + health_code_update(); /* * Pass 2 as size here for the thread quit pipe and kconsumerd_err_sock. -- 2.34.1