From reviews-return-53747-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Fri Jan 13 23:08:24 2017 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 3F4D7197DA for ; Fri, 13 Jan 2017 23:08:24 +0000 (UTC) Received: (qmail 3760 invoked by uid 500); 13 Jan 2017 23:08:24 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 3727 invoked by uid 500); 13 Jan 2017 23:08:24 -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 3710 invoked by uid 99); 13 Jan 2017 23:08:23 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2017 23:08:23 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 7576D2F98E8; Fri, 13 Jan 2017 23:08:23 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5895579986491086926==" MIME-Version: 1.0 Subject: Re: Review Request 55509: Validate the StatusUpdate UUID in Master::statusUpdate. From: Jiang Yan Xu To: Jiang Yan Xu Cc: James Peach , mesos Date: Fri, 13 Jan 2017 23:08:23 -0000 Message-ID: <20170113230823.25657.86336@reviews.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/55509/ X-Sender: Jiang Yan Xu X-ReviewBoard-ShipIt: 1 References: <20170113184157.1677.12726@reviews.apache.org> In-Reply-To: <20170113184157.1677.12726@reviews.apache.org> Reply-To: Jiang Yan Xu X-ReviewRequest-Repository: mesos --===============5895579986491086926== 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/55509/#review161611 ----------------------------------------------------------- Fix it, then Ship it! Looks like there are a few more cases of status update acknowledgements that have this UUID issue. src/master/master.cpp (line 5824) Actually preincrement is the more common/style-guide-conforming style in Mesos and in the rest of the file, it's the other instances in this method that are inconsistent. https://google.github.io/styleguide/cppguide.html#Preincrement_and_Predecrement src/master/master.cpp (lines 5829 - 5830) About > ... from agent pid with id ... If we move this check down to be after ``` Slave* slave = slaves.registered.get(update.slave_id()); if (slave == nullptr) { ... } ``` Then you can just use the output overload to do ``` "agent " << *slave << ...; ``` which prints the agent info more uniformly. - Jiang Yan Xu On Jan. 13, 2017, 10:41 a.m., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55509/ > ----------------------------------------------------------- > > (Updated Jan. 13, 2017, 10:41 a.m.) > > > Review request for mesos and Jiang Yan Xu. > > > Bugs: MESOS-6920 > https://issues.apache.org/jira/browse/MESOS-6920 > > > Repository: mesos > > > Description > ------- > > To be consistent with Master::statusUpdateAcknowledgement(), validate > that the UUID in the StatusUpdate message is acceptable to the > UUID::fromBytes() parser. > > > Diffs > ----- > > src/master/master.cpp 1746a88953dbdc148d98881bcf7027b62ad6b040 > > Diff: https://reviews.apache.org/r/55509/diff/ > > > Testing > ------- > > Make check (Fedora 25). Manual testing with a handmade StatusUpdate message. > > > Thanks, > > James Peach > > --===============5895579986491086926==--