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 3809817765 for ; Fri, 3 Oct 2014 17:16:38 +0000 (UTC) Received: (qmail 52251 invoked by uid 500); 3 Oct 2014 17:16:37 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 52208 invoked by uid 500); 3 Oct 2014 17:16: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 52195 invoked by uid 99); 3 Oct 2014 17:16:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Oct 2014 17:16:36 +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, 03 Oct 2014 17:16:09 +0000 Received: (qmail 52070 invoked by uid 99); 3 Oct 2014 17:16:07 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Oct 2014 17:16:07 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id CD7DD1DDC3A; Fri, 3 Oct 2014 17:16:03 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============9033204895230510392==" MIME-Version: 1.0 Subject: Re: Review Request 26298: Use a less broad retry loop for RPCs. From: "Bill Farner" To: "Maxim Khutornenko" , "Mark Chu-Carroll" Cc: "Bill Farner" , "Aurora" Date: Fri, 03 Oct 2014 17:16:03 -0000 Message-ID: <20141003171603.19041.32602@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Bill Farner" X-ReviewGroup: Aurora X-ReviewRequest-URL: https://reviews.apache.org/r/26298/ X-Sender: "Bill Farner" References: <20141003002102.18846.17473@reviews.apache.org> In-Reply-To: <20141003002102.18846.17473@reviews.apache.org> Reply-To: "Bill Farner" X-ReviewRequest-Repository: aurora X-Virus-Checked: Checked by ClamAV on apache.org --===============9033204895230510392== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Oct. 3, 2014, 12:21 a.m., Maxim Khutornenko wrote: > > src/main/python/apache/aurora/client/api/scheduler_client.py, line 286 > > > > > > Why not just add a break into the Exception catcher instead? > > Maxim Khutornenko wrote: > Actually, we are throwing there already. Wait, how is the exception is trapped in that loop? > > Bill Farner wrote: > I scratched my head at this for a while, and wound up with this review: https://reviews.apache.org/r/26308/ > > AFAICT `threading.Event` does not override `__bool__`, so those branches are never entered, and we loop until the timer is up. > > Maxim Khutornenko wrote: > I am assuming this patch will be revisited then? > > Bill Farner wrote: > Yup. I'm going to open a new review to introduce the sleep between transient error retries, though. Scratch that - didn't notice the local raise->catch on TransientError. Closing. - Bill ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/26298/#review55295 ----------------------------------------------------------- On Oct. 3, 2014, 12:18 a.m., Bill Farner wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/26298/ > ----------------------------------------------------------- > > (Updated Oct. 3, 2014, 12:18 a.m.) > > > Review request for Aurora, Mark Chu-Carroll and Maxim Khutornenko. > > > Repository: aurora > > > Description > ------- > > A few times when making changes, i've found myself confused at a stalled test and spiked CPU, only to find that my test should have failed, but an exception is trapped in this retry loop. The key change here is that unknown exceptions will break the loop. > > Making this change pointed out what should have been a test failure in `test_transient_error`, where an exception caused by an unexpected call to `getVersion` was swallowed. > > > Diffs > ----- > > src/main/python/apache/aurora/client/api/scheduler_client.py b400cb2dbdb35077fc2c4a6e161c2959a9217317 > src/test/python/apache/aurora/client/api/test_scheduler_client.py 1cbfbf86e903d890baac7d34461109f9beaff442 > > Diff: https://reviews.apache.org/r/26298/diff/ > > > Testing > ------- > > ./pants src/test/python:all -vxs > > > Thanks, > > Bill Farner > > --===============9033204895230510392==--