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 16FFB200D4A for ; Tue, 14 Nov 2017 01:33:14 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5B90B160C08; Tue, 14 Nov 2017 00:33:08 +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 A14D1160BF3 for ; Tue, 14 Nov 2017 01:33:07 +0100 (CET) Received: (qmail 73055 invoked by uid 500); 14 Nov 2017 00:33:01 -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 73036 invoked by uid 99); 14 Nov 2017 00:33:01 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2017 00:33:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4850DC541E for ; Tue, 14 Nov 2017 00:33:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.88 X-Spam-Level: * X-Spam-Status: No, score=1.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id uRUZRgvWeAWH for ; Tue, 14 Nov 2017 00:32:59 +0000 (UTC) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id F280461056 for ; Tue, 14 Nov 2017 00:32:58 +0000 (UTC) Received: by mail-it0-f45.google.com with SMTP id f187so11683021itb.1 for ; Mon, 13 Nov 2017 16:32:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=9vpHNSQTNr+NpuY4L8SwKPaFqAPV+HGzbNW08bSGq8g=; b=lXv+Lz/T25TmvpBNpnDSUYRykMRqbTlHiscDWBNUKeNNNQn9+RpfwPrMns7qU9gstP WoF5L6yCxr9fKX/sLfrNJO97vikWRt1K4uL0BSWLfQLdOj75j2QfyVGPyIRbMtlmy623 wz7gn6ftInhZ85QVpT/GySFp6f8qGcM1xsjmG4OODldWDtBbF2vQoWJlpCMZRKven95+ NDEc47KGZ5zoT8WYh+biCCHPMU7J1dZCMd/zYEa3PQ5lol3QSyWRSGw4gXxdhou8hCyY LUgZe2xhLTDsmo6Vf0wRHceZI8cvHkHPOb17bOsbbwYjenq5onOt6z1MAlG0xyhnSyA4 TjmQ== 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=9vpHNSQTNr+NpuY4L8SwKPaFqAPV+HGzbNW08bSGq8g=; b=SKkYI4Bl3bGgpze5l5t+rMjRvSBQFy4bMza+a1pV72xxUzALG5LvExJm9ZadIVeAXG ojfo1+bawww4QtyLyyL1Oy7gGjWqFoDAz/nFEca/sJEP2Q1JeE8pPj5LOtYQl6AfD1Rc RvRe3WR4YWXubwiwm9cYz3mfB0IijrlvLG22n/KSkhwIuR+xFJ7rg2b+4ivrDpwiq1aM K7mz/BEfeGTlgLuiYWezpxpZkzWdU2vhYT8gBDa1XZic5t2twHqf9PtnYaVranyfgVTT sdYqR6Ib6o3Ob7PPbLa3m9MhEIS/wOl7sf9EUEWALTwXj+MzwvQamsRuPn0ey5cKFjoq jVOw== X-Gm-Message-State: AJaThX7BkZCTw5TTWyG7sjFzuSvtTv6nYYlpr9y9XsiFY/Hc7OrLVK27 vo9ZPjeSzRUNZViZD7W5qBdJgSbbvQac2frxXDs13A== X-Google-Smtp-Source: AGs4zMYUNj3iOVc25vcP6w63a+q8aRca3mTJ3NgCaGFpocTPvf/SODQ/9txP9PwBboZ1E4H22UfAyqJBPqrV1N3Zv4Y= X-Received: by 10.36.225.136 with SMTP id n130mr9315815ith.20.1510619578312; Mon, 13 Nov 2017 16:32:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.12.6 with HTTP; Mon, 13 Nov 2017 16:32:57 -0800 (PST) In-Reply-To: References: From: Lei Chang Date: Tue, 14 Nov 2017 08:32:57 +0800 Message-ID: Subject: Re: Hawq standby sync fails if there are existing connections to master To: dev Content-Type: multipart/alternative; boundary="94eb2c19dbf25b2c3a055de68722" archived-at: Tue, 14 Nov 2017 00:33:14 -0000 --94eb2c19dbf25b2c3a055de68722 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 connections 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 command > 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 fa= st > 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 terminate > 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 work > on a pull request to fix this. > > Looking forward to your thoughts on this. > =E2=80=8B > -- > Regards, > Shubham Sharma > --94eb2c19dbf25b2c3a055de68722--