Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 63145200C03 for ; Sat, 7 Jan 2017 02:50:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 61B0C160B39; Sat, 7 Jan 2017 01:50:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B31F2160B49 for ; Sat, 7 Jan 2017 02:49:59 +0100 (CET) Received: (qmail 19476 invoked by uid 500); 7 Jan 2017 01:49:58 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 19418 invoked by uid 99); 7 Jan 2017 01:49:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jan 2017 01:49:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 743422C03DE for ; Sat, 7 Jan 2017 01:49:58 +0000 (UTC) Date: Sat, 7 Jan 2017 01:49:58 +0000 (UTC) From: "Apurva Mehta (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-4558) throttling_test fails if the producer starts too fast. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 07 Jan 2017 01:50:00 -0000 [ https://issues.apache.org/jira/browse/KAFKA-4558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15806466#comment-15806466 ] Apurva Mehta commented on KAFKA-4558: ------------------------------------- I dug a bit further into the `JmxMixin`, and it seems that all we have to do in the console consumer is something like the following: {code} def has_partitions_assigned(self): # we run at init jmx_object_names += ['partitions-assigned'] self.read_jmx_output(idx, node) return self.average_jmx_value['partitions_assigned'] > 0 {code} Then the current `wait_until` in `ProduceConsumeValidate.start_producer_and_consumer` should just wait until `has_partitions_assigned` returns true. Does this seem reasonable? Or have I misunderstood how this is supposed to work? > throttling_test fails if the producer starts too fast. > ------------------------------------------------------ > > Key: KAFKA-4558 > URL: https://issues.apache.org/jira/browse/KAFKA-4558 > Project: Kafka > Issue Type: Bug > Reporter: Apurva Mehta > Assignee: Apurva Mehta > > As described in https://issues.apache.org/jira/browse/KAFKA-4526, the throttling test will fail if the producer in the produce-consume-validate loop starts up before the consumer is fully initialized. > We need to block the start of the producer until the consumer is ready to go. > The current plan is to poll the consumer for a particular metric (like, for instance, partition assignment) which will act as a good proxy for successful initialization. Currently, we just check for the existence of a process with the PID, which is not a strong enough check, causing the test to fail intermittently. -- This message was sent by Atlassian JIRA (v6.3.4#6332)