From reviews-return-65135-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Tue Aug 22 03:32:20 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 3D9EE199CE for ; Tue, 22 Aug 2017 03:32:20 +0000 (UTC) Received: (qmail 5475 invoked by uid 500); 22 Aug 2017 03:32:20 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 5423 invoked by uid 500); 22 Aug 2017 03:32:19 -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 5411 invoked by uid 99); 22 Aug 2017 03:32:19 -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; Tue, 22 Aug 2017 03:32:19 +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 EA02A180491; Tue, 22 Aug 2017 03:32:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.201 X-Spam-Level: **** X-Spam-Status: No, score=4.201 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, NML_ADSP_CUSTOM_MED=1.2, RP_MATCHES_RCVD=-0.001] 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 Upz6RZ_YoQZs; Tue, 22 Aug 2017 03:32:17 +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 8FCFE5FB0B; Tue, 22 Aug 2017 03:32:17 +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 29BCAE0114; Tue, 22 Aug 2017 03:32:17 +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 3E64CC40474; Tue, 22 Aug 2017 03:32:15 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8576408232000628047==" MIME-Version: 1.0 Subject: Re: Review Request 60764: Refactored isolator dependency checking. From: Jie Yu To: Qian Zhang , Jiang Yan Xu Cc: Jie Yu , James Peach , mesos Date: Tue, 22 Aug 2017 03:32:14 -0000 Message-ID: <20170822033214.3007.35046@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Jie Yu X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/60764/ X-Sender: Jie Yu X-ReviewBoard-ShipIt: 1 References: <20170711111311.38508.41827@reviews-vm2.apache.org> In-Reply-To: <20170711111311.38508.41827@reviews-vm2.apache.org> Reply-To: Jie Yu X-ReviewRequest-Repository: mesos --===============8576408232000628047== 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/60764/#review183435 ----------------------------------------------------------- Fix it, then Ship it! Thanks for the cleanup! src/slave/containerizer/mesos/containerizer.cpp Lines 148 (patched) Let's just inline this method. There is only one user for this method. src/slave/containerizer/mesos/containerizer.cpp Line 154 (original), 169 (patched) Can you create a LinkedHashset (similar to LinkedHashmap) in stout which preserve the insertion order. this solves one issues about the ordering of the isolators is not preserved. I would at least add a TODO here (i do wish you can follow up :)) src/slave/containerizer/mesos/containerizer.cpp Lines 182-184 (original), 203-208 (patched) The indentation should be like the following: ``` switch (std::count_if( isolations->begin(), isolations->end(), [](...) { })) { } ``` similar to what we did for other statements: ``` int foo = func( param1, param2); ``` - Jie Yu On July 11, 2017, 11:13 a.m., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60764/ > ----------------------------------------------------------- > > (Updated July 11, 2017, 11:13 a.m.) > > > Review request for mesos, Qian Zhang and Jiang Yan Xu. > > > Bugs: MESOS-7675 > https://issues.apache.org/jira/browse/MESOS-7675 > > > Repository: mesos > > > Description > ------- > > Refactored the isolator dependency checks to immediately tokenize > the isolator string, which makes it easier to check various consistency > conditions. > > > Diffs > ----- > > src/slave/containerizer/mesos/containerizer.cpp ff192bb085f3554ad1b1f20fb73bf827bf04ef13 > > > Diff: https://reviews.apache.org/r/60764/diff/7/ > > > Testing > ------- > > make check (Fedora 26) > > > Thanks, > > James Peach > > --===============8576408232000628047==--