From reviews-return-77120-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Fri May 4 15:19:06 2018 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 11E03188D7 for ; Fri, 4 May 2018 15:19:06 +0000 (UTC) Received: (qmail 83986 invoked by uid 500); 4 May 2018 15:19:05 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 83963 invoked by uid 500); 4 May 2018 15:19:05 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 83254 invoked by uid 99); 4 May 2018 15:19:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2018 15:19:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C9DCA18048D; Fri, 4 May 2018 15:19:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.689 X-Spam-Level: * X-Spam-Status: No, score=1.689 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=2, KAM_INFOUSMEBIZ=0.75, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id T7T1xSgBi13e; Fri, 4 May 2018 15:19:02 +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 1C5EB5F4E4; Fri, 4 May 2018 15:19:02 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CE9B2E00EA; Fri, 4 May 2018 15:19:01 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 9AE8AC40015; Fri, 4 May 2018 15:19:01 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7663270680962868375==" MIME-Version: 1.0 Subject: Re: Review Request 66919: Failure to update registry should abort the master process. From: Jiang Yan Xu To: Jiang Yan Xu Cc: Xudong Ni , mesos Date: Fri, 04 May 2018 15:19:01 -0000 Message-ID: <20180504151901.31647.48581@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Jiang Yan Xu X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/66919/ X-Sender: Jiang Yan Xu References: <20180503164306.43656.17466@reviews-vm2.apache.org> In-Reply-To: <20180503164306.43656.17466@reviews-vm2.apache.org> Reply-To: Jiang Yan Xu X-ReviewRequest-Repository: mesos --===============7663270680962868375== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66919/#review202416 ----------------------------------------------------------- LGTM It's hard to write a test for this but we can probably modify a test in master_maintenance_tests.cpp to observe the check failure. Let's also check Joseph with the comment here. https://github.com/apache/mesos/blob/520b729857223aeade345cbdf61209ec4f395ad9/src/master/maintenance.hpp#L39 src/master/http.cpp Lines 4163-4165 (patched) The following will be more idiomatic. ``` .onAny([](const Future& result) { CHECK_READY(result); }) ``` Note the spaces and const ref. It'll be helpful to get familiarize with https://github.com/apache/mesos/blob/master/docs/c%2B%2B-style-guide.md which in turn references https://google.github.io/styleguide/cppguide.html - Jiang Yan Xu On May 3, 2018, 9:43 a.m., Xudong Ni wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66919/ > ----------------------------------------------------------- > > (Updated May 3, 2018, 9:43 a.m.) > > > Review request for mesos and Jiang Yan Xu. > > > Bugs: MESOS-8630 > https://issues.apache.org/jira/browse/MESOS-8630 > > > Repository: mesos > > > Description > ------- > > When the registrar fails to update the registry it would abort the > actor and fail all future operations,However when the registrar > updates is requested by an operator API such as maintenance update, > the master process doesn't shut down (a 500 error is returned to the > client instead)and all subsequent operations will fail. > > Review: https://reviews.apache.org/r/66919 > > > Diffs > ----- > > src/master/http.cpp 135ae4389623385a6638158f5f23d6daca14a0ad > > > Diff: https://reviews.apache.org/r/66919/diff/1/ > > > Testing > ------- > > No error found by running all unit tests(make check) > > > Thanks, > > Xudong Ni > > --===============7663270680962868375==--