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 B2F25200CF8 for ; Thu, 31 Aug 2017 00:16:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B1E9A16A1F2; Wed, 30 Aug 2017 22:16:14 +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 033BC16A1EE for ; Thu, 31 Aug 2017 00:16:13 +0200 (CEST) Received: (qmail 66702 invoked by uid 500); 30 Aug 2017 22:16:11 -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 66691 invoked by uid 99); 30 Aug 2017 22:16:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Aug 2017 22:16:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1FC411A0508; Wed, 30 Aug 2017 22:16:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id chwgDsereTHR; Wed, 30 Aug 2017 22:16:09 +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 E4FB85FDDC; Wed, 30 Aug 2017 22:16:08 +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 EB583E069E; Wed, 30 Aug 2017 22:16:02 +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 5A6BBC411E7; Wed, 30 Aug 2017 22:16:01 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4321458724009165229==" MIME-Version: 1.0 Subject: Re: Review Request 61918: Fix concurrency issues around banned offers in HostOffers From: Aurora ReviewBot To: Santhosh Kumar Shanmugham , David McLaughlin , Stephan Erb , Dmitry Zhuk Cc: Aurora , Jordan Ly , Aurora ReviewBot Date: Wed, 30 Aug 2017 22:16:01 -0000 Message-ID: <20170830221601.20155.784@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Aurora ReviewBot X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/61918/ X-Sender: Aurora ReviewBot References: <20170830212448.20155.89086@reviews-vm2.apache.org> In-Reply-To: <20170830212448.20155.89086@reviews-vm2.apache.org> Reply-To: Aurora ReviewBot X-ReviewRequest-Repository: aurora archived-at: Wed, 30 Aug 2017 22:16:14 -0000 --===============4321458724009165229== 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/61918/#review184209 ----------------------------------------------------------- Master (364eac5) is green with this patch. ./build-support/jenkins/build.sh However, it appears that it might lack test coverage. I will refresh this build result if you post a review containing "@ReviewBot retry" - Aurora ReviewBot On Aug. 30, 2017, 9:24 p.m., Jordan Ly wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61918/ > ----------------------------------------------------------- > > (Updated Aug. 30, 2017, 9:24 p.m.) > > > Review request for Aurora, David McLaughlin, Dmitry Zhuk, Santhosh Kumar Shanmugham, and Stephan Erb. > > > Repository: aurora > > > Description > ------- > > Currently, `getOffers` and `getWeaklyConsistentOffers` provide iterables that use lambdas (in filter) not backed by concurrent data structures (`globallyBannedOffers` and `staticallyBannedOffers`). This can lead to a race condition where we have unknown behavior if reading and modification happens at the same time. > > To fix this, in `getOffers` we will revert to the previous behavior (before patch https://reviews.apache.org/r/61804/) where we create a copy of the current offers as well as a copy of the banned offers for consistency. > > For `getWeaklyConsistentOffers`, we will use concurrent data structures for `globallyBannedOffers` and `staticallyBannedOffers` so we don't have a race that may produce unknown side effects. > > > Diffs > ----- > > src/main/java/org/apache/aurora/scheduler/offers/OfferManager.java 5697d2e2eb001042511924442ff2dbe358451642 > > > Diff: https://reviews.apache.org/r/61918/diff/5/ > > > Testing > ------- > > Unit tests pass. > > Currently running end to end test and testing on a live cluster. > > > Thanks, > > Jordan Ly > > --===============4321458724009165229==--