Return-Path: X-Original-To: apmail-aurora-reviews-archive@minotaur.apache.org Delivered-To: apmail-aurora-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 039CF174DD for ; Fri, 30 Jan 2015 05:46:46 +0000 (UTC) Received: (qmail 20964 invoked by uid 500); 30 Jan 2015 05:46:37 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 20919 invoked by uid 500); 30 Jan 2015 05:46:37 -0000 Mailing-List: contact reviews-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.incubator.apache.org Delivered-To: mailing list reviews@aurora.incubator.apache.org Received: (qmail 20908 invoked by uid 99); 30 Jan 2015 05:46:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jan 2015 05:46:36 +0000 X-ASF-Spam-Status: No, hits=-1997.8 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 30 Jan 2015 05:46:35 +0000 Received: (qmail 19311 invoked by uid 99); 30 Jan 2015 05:44:55 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jan 2015 05:44:55 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id A8A771D99B6; Fri, 30 Jan 2015 05:44:50 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1859258310631575096==" MIME-Version: 1.0 Subject: Re: Review Request 30433: Prevent multiple active job updates from being inserted into storage. From: "Maxim Khutornenko" To: "Maxim Khutornenko" Cc: "Bill Farner" , "Aurora" Date: Fri, 30 Jan 2015 05:44:50 -0000 Message-ID: <20150130054450.25680.81708@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Maxim Khutornenko" X-ReviewGroup: Aurora X-ReviewRequest-URL: https://reviews.apache.org/r/30433/ X-Sender: "Maxim Khutornenko" References: <20150130002133.25679.60885@reviews.apache.org> In-Reply-To: <20150130002133.25679.60885@reviews.apache.org> Reply-To: "Maxim Khutornenko" X-ReviewRequest-Repository: aurora X-Virus-Checked: Checked by ClamAV on apache.org --===============1859258310631575096== 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/30433/#review70316 ----------------------------------------------------------- Ship it! src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java Suggest adding an explanation of what active update means, e.g.: "An update in one of the following states is considered active" + ACTIVE_JOB_UPDATE_STATES. Otherwise, it can be unclear why PAUSED update prevents from creating a new one. - Maxim Khutornenko On Jan. 30, 2015, 12:21 a.m., Bill Farner wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30433/ > ----------------------------------------------------------- > > (Updated Jan. 30, 2015, 12:21 a.m.) > > > Review request for Aurora and Maxim Khutornenko. > > > Bugs: AURORA-1023 > https://issues.apache.org/jira/browse/AURORA-1023 > > > Repository: aurora > > > Description > ------- > > This adds a guard before an update is saved to make sure we don't already have an active update for the given job. This was an implied invariant due to the relationship between the locks table and job updates table, but that relationship can be compromised by outside user action. > > > Diffs > ----- > > src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java a992938d4e12b20f81608be6bbdc24c0a211c3fd > src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java 4c827b183a87b4d97774edbfaa960bd1c3de72a5 > > Diff: https://reviews.apache.org/r/30433/diff/ > > > Testing > ------- > > > Thanks, > > Bill Farner > > --===============1859258310631575096==--