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 1C40D200D4A for ; Tue, 14 Nov 2017 01:47:11 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D8B24160BF3; Tue, 14 Nov 2017 00:47:05 +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 04F9C160C07 for ; Tue, 14 Nov 2017 01:47:04 +0100 (CET) Received: (qmail 98013 invoked by uid 500); 14 Nov 2017 00:46:58 -0000 Mailing-List: contact dev-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list dev@hawq.incubator.apache.org Received: (qmail 98001 invoked by uid 99); 14 Nov 2017 00:46:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2017 00:46:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id AF2F61A0F38 for ; Tue, 14 Nov 2017 00:46:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.481 X-Spam-Level: ** X-Spam-Status: No, score=2.481 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=pivotal-io.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id xWwbSFphqLoO for ; Tue, 14 Nov 2017 00:46:55 +0000 (UTC) Received: from mail-vk0-f50.google.com (mail-vk0-f50.google.com [209.85.213.50]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id F05865F640 for ; Tue, 14 Nov 2017 00:46:54 +0000 (UTC) Received: by mail-vk0-f50.google.com with SMTP id n63so1600592vkf.2 for ; Mon, 13 Nov 2017 16:46:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=i0wRyYKYTuMa6Ticg5aoSQCEPfj4sBknXSvx+Rx1QeI=; b=EC43hBMbckluUTDqglows9vWqtxoSY+ox9aPp9s28h/zeZm88q3UkKiHVzKrT6oBZ6 RR6z8k85b6tZkyN7KrCEq8qb4KqBQdJzAra2u3Ad7W+CtSOdRyufALKQ0uIe5xCnAehy lChqtou6uZr2A8+V+NJ5iEgpomiboL1UEKVMUJjr3gMVm2MHe/EdrUsWMYgCWsSdWZy0 bnan7XBHZVTcu7/EnKDtB2k6xEsD1w9G6HZp5BZ3ab1aMWadIty3g2EFnq7/555qDwtj whR+/7LezNRuB13VgSSG5XYVaDPfmuLmSPtzdJkMEC9EY+9bcq1LoUxx9r1LCCvYNQ+W plNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=i0wRyYKYTuMa6Ticg5aoSQCEPfj4sBknXSvx+Rx1QeI=; b=jMOToEeUiJaoucOWLK9oLY50fgH6L2l7RsPJY9QxvmTkaseMge2msssw36WJcsNIlZ R5IM2eQkBm9kWKMcXCFok40mYxef8Nd4o6tJJSrBA3cPcEhTTkAYeCbETQYW+htE1avF rRzyeyspYn3cKv6TpTBxwEGoxhR/AU6vBDKhopecdv++xaG0PMb7y9zDPmjABgjBWarq 0VRuh+t1prcAn0hBxsYO6U2maGnVaEbcQLeDSQ9gFAJgUxNPWLgVVA3KdRepERga/B5B UtPhX71KzrrZfHCdl/rXbReADSImfSwJzlmGH18FnO1HHQN6DCRP2hRa7Gjgd0Whis3B ciDQ== X-Gm-Message-State: AJaThX7Dr6Q1hOquwvQqdLr8CJo0H0K3kJs0dcKfDaj5P81W/mFGNmDk E3h9UXD3mSaaADHecdm2gsw9fOBA4pAwnCeOIAk3qZru X-Google-Smtp-Source: AGs4zMa8/8ica8U8ZSeL3BO35zvhlwrPxOzBC1uM+IzANu+hUZS5X4qpIi20S3yhH38KfXig67seZP40Qv+3lTIGbdw= X-Received: by 10.31.212.134 with SMTP id l128mr7403359vkg.184.1510620407322; Mon, 13 Nov 2017 16:46:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.188.9 with HTTP; Mon, 13 Nov 2017 16:46:46 -0800 (PST) In-Reply-To: References: From: Shubham Sharma Date: Mon, 13 Nov 2017 16:46:46 -0800 Message-ID: Subject: Re: Hawq standby sync fails if there are existing connections to master To: dev@hawq.incubator.apache.org Content-Type: multipart/alternative; boundary="94eb2c07dcaac4f6eb055de6b8a3" archived-at: Tue, 14 Nov 2017 00:47:11 -0000 --94eb2c07dcaac4f6eb055de6b8a3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the response Lei. I understand this completely and agree with the behavior that we should not brutally terminate connections. However, the case here is, am deliberately trying to use stop mode using command `hawq init standby -n -v -M fast`. At this point as a user I understand that connections will be terminated without warning. When passing option `-M fast` hawq should not interrupt me. Basically, hawq command line is not respecting `-M fast`. Whereas hawq init standby --help documents this option. Let me know if this makes sense. hawq init standby --help Usage: HAWQ management scripts options Options: -h, --help show this help message and exit -a, --prompt Execute automatically -M STOP_MODE, --mode=3DSTOP_MODE HAWQ stop mode: smart/fast/immediate On Mon, Nov 13, 2017 at 4:32 PM, Lei Chang wrote: > Hi Shubham, > > The behavior is intentional. If there are connections when HAWQ init > standby, it is better to warn the client instead of cutting the connectio= ns > brutally. > > Cheers > Lei > > > > On Mon, Nov 13, 2017 at 11:58 AM, Shubham Sharma > wrote: > > > Hello folks, > > > > Recently observed a behaviour while re-syncing standby from hawq comman= d > > line. > > > > Here are the reproduction steps - > > > > 1 - Open a client connection to hawq using psql > > 2 - From a different terminal run command - hawq init standby -n -v -M > fast > > 3 - Standby resync fails with error > > > > > > 20171113:03:49:21:158354 hawq_stop:hdp3:gpadmin-[WARNING]:-There are > > other connections to this instance, shutdown mode smart aborted > > > > 20171113:03:49:21:158354 hawq_stop:hdp3:gpadmin-[WARNING]:-Either > > remove connections, or use 'hawq stop master -M fast' or 'hawq stop > > master -M immediate' > > > > 20171113:03:49:21:158354 hawq_stop:hdp3:gpadmin-[WARNING]:-See hawq > > stop --help for all options > > > > 20171113:03:49:21:158354 hawq_stop:hdp3:gpadmin-[ERROR]:-Active > > connections. Aborting shutdown... > > > > 20171113:03:49:21:158143 hawq_init:hdp3:gpadmin-[ERROR]:-Stop hawq > > cluster failed, exit > > > > 4 - My understanding is when -M (stop mode) is passed it should termina= te > > existing client connections. Also, it seems like a good practice to > > terminate client connections before standby master resync. > > > > Is this an expected behavior in hawq ? If not, I can open a JIRA and wo= rk > > on a pull request to fix this. > > > > Looking forward to your thoughts on this. > > =E2=80=8B > > -- > > Regards, > > Shubham Sharma > > > --=20 Regards, Shubham Sharma Staff Customer Engineer Pivotal Global Support Services ssharma@pivotal.io Direct Tel: +1(510)-304-8201 Office Hours: Mon-Fri 9:00 am to 5:00 pm PDT Out of Office Hours Contact +1 877-477-2269 --94eb2c07dcaac4f6eb055de6b8a3--