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 740C1200C86 for ; Wed, 31 May 2017 22:04:34 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 726CE160BCB; Wed, 31 May 2017 20:04:34 +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 B82C1160BC2 for ; Wed, 31 May 2017 22:04:33 +0200 (CEST) Received: (qmail 1487 invoked by uid 500); 31 May 2017 20:04:33 -0000 Mailing-List: contact reviews-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.apache.org Delivered-To: mailing list reviews@aurora.apache.org Received: (qmail 1465 invoked by uid 99); 31 May 2017 20:04:32 -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; Wed, 31 May 2017 20:04:32 +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 4255ACDB3E; Wed, 31 May 2017 20:04:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.451 X-Spam-Level: **** X-Spam-Status: No, score=4.451 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, KAM_LOTSOFHASH=0.25, NML_ADSP_CUSTOM_MED=1.2, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id gZBNKA4bWEc1; Wed, 31 May 2017 20:04:31 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3DB535F27B; Wed, 31 May 2017 20:04:30 +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 93515E01D9; Wed, 31 May 2017 20:04:29 +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 60A8DC40414; Wed, 31 May 2017 20:04:29 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0189171506280079635==" MIME-Version: 1.0 Subject: Re: Review Request 59640: Prioritize adding instances over updating instances during an update From: Santhosh Kumar Shanmugham To: Santhosh Kumar Shanmugham , David McLaughlin , Stephan Erb , Zameer Manji Cc: Aurora , Jordan Ly Date: Wed, 31 May 2017 20:04:29 -0000 Message-ID: <20170531200429.8717.50768@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Santhosh Kumar Shanmugham X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/59640/ X-Sender: Santhosh Kumar Shanmugham References: <20170530212113.1818.17150@reviews-vm2.apache.org> In-Reply-To: <20170530212113.1818.17150@reviews-vm2.apache.org> Reply-To: Santhosh Kumar Shanmugham X-ReviewRequest-Repository: aurora archived-at: Wed, 31 May 2017 20:04:34 -0000 --===============0189171506280079635== 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/59640/#review176507 ----------------------------------------------------------- LGTM. Minor comments. src/main/java/org/apache/aurora/scheduler/updater/UpdateFactory.java Lines 163 (patched) private class? Do we really need this class to be `Serializable`? src/main/java/org/apache/aurora/scheduler/updater/UpdateFactory.java Lines 193 (patched) avoid `this`? src/main/java/org/apache/aurora/scheduler/updater/UpdateFactory.java Lines 201-204 (patched) This seems extra defensive. - Santhosh Kumar Shanmugham On May 30, 2017, 2:21 p.m., Jordan Ly wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/59640/ > ----------------------------------------------------------- > > (Updated May 30, 2017, 2:21 p.m.) > > > Review request for Aurora, David McLaughlin, Santhosh Kumar Shanmugham, Stephan Erb, and Zameer Manji. > > > Bugs: AURORA-1928 > https://issues.apache.org/jira/browse/AURORA-1928 > > > Repository: aurora > > > Description > ------- > > Currently, when updating a job we choose to update instances naively by ascending instance ID number. > However, it would be better to add new instances before killing and updating older instances. > > This patch makes it so the job updater prefers to create new instances, then > update instances, and finally kill instances. > > > Diffs > ----- > > src/main/java/org/apache/aurora/scheduler/updater/UpdateFactory.java 14c2d2de3186271819a5f4e527d3b30fd34d2b21 > src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java 290385d737294e23e9dd50f2631303124aa7af7c > src/test/java/org/apache/aurora/scheduler/updater/UpdateFactoryImplTest.java 611f6b8681c8e0b286cd361bdb5ace1fea39d9a5 > > > Diff: https://reviews.apache.org/r/59640/diff/1/ > > > Testing > ------- > > Ran unit tests and integration tests. > > Had to modify some integration tests since we now prefer to create over update -- needed to change > the ordering of actions. Additionally, some unit tests only specified configs for one instance even > though desiredInstances is always 2 -- had to make it so the range of configurations is always 0-2 > when creating. Otherwise, it would try to create instances first even though the test didn't really > care. > > Tested different update configurations on the Vagrant cluster: only adding instances, only updating > instances, only killing instances, create & update, update & kill. > > > Thanks, > > Jordan Ly > > --===============0189171506280079635==--