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 7D47A200CE0 for ; Fri, 25 Aug 2017 13:43:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7BB0016C839; Fri, 25 Aug 2017 11:43:04 +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 BEAAD16C836 for ; Fri, 25 Aug 2017 13:43:03 +0200 (CEST) Received: (qmail 90958 invoked by uid 500); 25 Aug 2017 11:43:02 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 90949 invoked by uid 99); 25 Aug 2017 11:43:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2017 11:43:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6EDB6C14BD for ; Fri, 25 Aug 2017 11:43:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id x1Day43N5kC4 for ; Fri, 25 Aug 2017 11:43:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 531946100B for ; Fri, 25 Aug 2017 11:43:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A9072E08B4 for ; Fri, 25 Aug 2017 11:43:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4C25A25381 for ; Fri, 25 Aug 2017 11:43:00 +0000 (UTC) Date: Fri, 25 Aug 2017 11:43:00 +0000 (UTC) From: "Arina Ielchiieva (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-5701) drill.connections.rpc.. metric not behaving correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 25 Aug 2017 11:43:04 -0000 [ https://issues.apache.org/jira/browse/DRILL-5701?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Arina Ielchiieva updated DRILL-5701: ------------------------------------ Reviewer: Karthikeyan Manivannan > drill.connections.rpc.. metric = not behaving correctly > -------------------------------------------------------------------------= ---------------------- > > Key: DRILL-5701 > URL: https://issues.apache.org/jira/browse/DRILL-5701 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 1.11.0 > Reporter: Sorabh Hamirwasia > Assignee: Sorabh Hamirwasia > Labels: ready-to-commit > Fix For: 1.12.0 > > > Reported by [~knguyen] > When sqlline fails to connect to drillbit such as a handshake failure, th= e drill.connections.rpc.user. metric subtracts 2 cou= nters (one for handshake failure and one when the user exits from sqlline).= As a result, the metric can end up with a negative value. For control conn= ections if the handshake fails then again counters related to those are upd= ated incorrectly. > *Issue Details:* > With the current implementation to update counter, the connection counter= will be incremented only when a handshake (Drill + SASL handshake) was suc= cessful, not with creation of a valid TCP connection. But the counter was d= ecremented in the channel closed callback of Netty which will be called whe= n TCP connection is teared down. Hence in case when Drill handshake fails e= ven though it has a valid TCP connection there won't be any increment. But = as part of handshake failure the TCP connection will be closed by Netty and= that results in decrement of the counter, which results in negative value = of the counter. When using Sqlline as client, if there is failure based on = above use case then the counter is decremented by 1 value. But later when *= quit* command is issued in sqlline then internally it again's tries to make= another connection which will follow the same flow above and will again de= crement the counter making the negative value of 2. From Drill's perspectiv= e the issue is we don't increment the connection count with a valid TCP con= nection but decrements it only in close of TCP connection. So with this PR = we are addressing those issues. Similar was a case for other channel counte= rs as well.=20 -- This message was sent by Atlassian JIRA (v6.4.14#64029)