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 0DE57200CE1 for ; Thu, 31 Aug 2017 11:51:39 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0C603169A62; Thu, 31 Aug 2017 09:51:39 +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 530E5169A4C for ; Thu, 31 Aug 2017 11:51:38 +0200 (CEST) Received: (qmail 18415 invoked by uid 500); 31 Aug 2017 09:51:37 -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 18404 invoked by uid 99); 31 Aug 2017 09:51:37 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Aug 2017 09:51:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A1ECA182CD9; Thu, 31 Aug 2017 09:51:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3 X-Spam-Level: *** X-Spam-Status: No, score=3 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ndqdM1cm3UMV; Thu, 31 Aug 2017 09:51:35 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 3F9E25FD42; Thu, 31 Aug 2017 09:51:35 +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 A1594E010F; Thu, 31 Aug 2017 09:51:34 +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 AA64BC400DA; Thu, 31 Aug 2017 09:51:33 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8639138625337921510==" MIME-Version: 1.0 Subject: Re: Review Request 61918: Fix concurrency issues around banned offers in HostOffers From: Dmitry Zhuk To: Santhosh Kumar Shanmugham , David McLaughlin , Stephan Erb , Dmitry Zhuk Cc: Aurora , Jordan Ly Date: Thu, 31 Aug 2017 09:51:33 -0000 Message-ID: <20170831095133.30580.12999@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Dmitry Zhuk X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/61918/ X-Sender: Dmitry Zhuk X-ReviewBoard-ShipIt: 1 References: <20170830212448.20155.89086@reviews-vm2.apache.org> In-Reply-To: <20170830212448.20155.89086@reviews-vm2.apache.org> X-ReviewBoard-ShipIt-Only: 1 Reply-To: Dmitry Zhuk X-ReviewRequest-Repository: aurora archived-at: Thu, 31 Aug 2017 09:51:39 -0000 --===============8639138625337921510== 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/#review184255 ----------------------------------------------------------- Ship it! Ship It! - Dmitry Zhuk 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 > > --===============8639138625337921510==--