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 5D90011661 for ; Fri, 21 Feb 2014 01:23:11 +0000 (UTC) Received: (qmail 18226 invoked by uid 500); 21 Feb 2014 01:23:10 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 18186 invoked by uid 500); 21 Feb 2014 01:23:10 -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 18177 invoked by uid 99); 21 Feb 2014 01:23:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Feb 2014 01:23:10 +0000 X-ASF-Spam-Status: No, hits=-1998.4 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,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, 21 Feb 2014 01:23:06 +0000 Received: (qmail 17367 invoked by uid 99); 21 Feb 2014 01:22:44 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Feb 2014 01:22:44 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 288A51D4926; Fri, 21 Feb 2014 01:22:44 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2093774134329969352==" MIME-Version: 1.0 Subject: Re: Review Request 18241: Reworked LogStorage to avoid unnecessary extra calls to write(). From: "Maxim Khutornenko" To: "Maxim Khutornenko" , "Kevin Sweeney" Cc: "Bill Farner" , "Aurora" Date: Fri, 21 Feb 2014 01:22:44 -0000 Message-ID: <20140221012244.19403.93630@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/18241/ X-Sender: "Maxim Khutornenko" References: <20140219171321.4367.23918@reviews.apache.org> In-Reply-To: <20140219171321.4367.23918@reviews.apache.org> Reply-To: "Maxim Khutornenko" X-ReviewRequest-Repository: aurora X-Virus-Checked: Checked by ClamAV on apache.org --===============2093774134329969352== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > On Feb. 19, 2014, 5:13 p.m., Maxim Khutornenko wrote: > > src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java, line 539 > > > > > > This is too easy to forget. Any chance this assert could be moved into log() instead? > > Bill Farner wrote: > A marvelous suggestion, done! > > Bill Farner wrote: > Scratch that, moving the assertion causes the in-memory store to be mutated. I can't think of a better option for now. > > Bill Farner wrote: > Maxim politely called me crazy offline, and he was correct. The above comment was a lie, and original suggestion is indeed marvelous. Misinterpreting the facts, I was just confused :) - Maxim ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/18241/#review34871 ----------------------------------------------------------- On Feb. 21, 2014, 1:16 a.m., Bill Farner wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/18241/ > ----------------------------------------------------------- > > (Updated Feb. 21, 2014, 1:16 a.m.) > > > Review request for Aurora, Kevin Sweeney and Maxim Khutornenko. > > > Bugs: AURORA-134 > https://issues.apache.org/jira/browse/AURORA-134 > > > Repository: aurora > > > Description > ------- > > Don't unnecessarily invoke write() within LogStorage, and assert that a transaction is open when a mutation is performed. > > I'm starting to explore a refactor that further cleans this up by extracting the *Store implementations out of LogStorage, which should simplify things by separating transaction management from delegation. > > > Diffs > ----- > > src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java 36e4082acceb3045ef92a5957b500e407bfc1247 > src/main/java/org/apache/aurora/scheduler/storage/testing/StorageTestUtil.java 005bad2c6b9f13e3438f3136e63fe777c6b42507 > src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java f708ab3c2fa5d50b084e037f9cc0cb998935120a > > Diff: https://reviews.apache.org/r/18241/diff/ > > > Testing > ------- > > ./gradlew build > > > Thanks, > > Bill Farner > > --===============2093774134329969352==--