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 D819A200D2B for ; Thu, 2 Nov 2017 19:12:12 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D4E89160BE5; Thu, 2 Nov 2017 18:12:12 +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 25DD11609EB for ; Thu, 2 Nov 2017 19:12:11 +0100 (CET) Received: (qmail 60487 invoked by uid 500); 2 Nov 2017 18:12: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 60476 invoked by uid 99); 2 Nov 2017 18:12:11 -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, 02 Nov 2017 18:12:11 +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 43DEB18089C; Thu, 2 Nov 2017 18:12:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.451 X-Spam-Level: **** X-Spam-Status: No, score=4.451 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_REPLYTO_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, NML_ADSP_CUSTOM_MED=1.2, 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 n_sn6RSmyHEn; Thu, 2 Nov 2017 18:12:09 +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 EBFFA61095; Thu, 2 Nov 2017 18:12: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 9A583E00A3; Thu, 2 Nov 2017 18:12:08 +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 E3463C40659; Thu, 2 Nov 2017 18:12:05 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2779691464163184620==" MIME-Version: 1.0 Subject: Review Request 63521: Fixed issue where saving attributes are not being persisted to log From: Jordan Ly To: Bill Farner , David McLaughlin , Stephan Erb Cc: Aurora , Jordan Ly Date: Thu, 02 Nov 2017 18:12:05 -0000 Message-ID: <20171102181205.55462.36988@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Jordan Ly X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/63521/ X-Sender: Jordan Ly Reply-To: Jordan Ly X-ReviewRequest-Repository: aurora archived-at: Thu, 02 Nov 2017 18:12:13 -0000 --===============2779691464163184620== 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/63521/ ----------------------------------------------------------- Review request for Aurora, David McLaughlin, Stephan Erb, and Bill Farner. Repository: aurora Description ------- A bug was introduced when the old `MemAttributeStore` was revived. Previously, the `saveHostAttributes` method did not return anything. However, after migrating to the DB stores, the signature of the interface was changed to return a `boolean` if the save modified the previous attributes. The new changes accidentally inverted the order. The old `MemAttributeStoreTest` did not explicity test for this scenario so it went unnoticed. The interface involved: ``` /** * Save a host attribute in the attribute store. * * @param hostAttributes The attribute we are going to save. * @return {@code true} if the operation changed the attributes stored for the given * {@link IHostAttributes#getHost() host}, or {@code false} if the save was a no-op. */ boolean saveHostAttributes(IHostAttributes hostAttributes); ``` Diffs ----- src/main/java/org/apache/aurora/scheduler/storage/mem/MemAttributeStore.java 483af194787e967a97c908a62889233336407aba src/test/java/org/apache/aurora/scheduler/storage/AbstractAttributeStoreTest.java 34db54be6eecbf0eaeab4fa2a19e6a66469cea88 Diff: https://reviews.apache.org/r/63521/diff/1/ Testing ------- Fixed tests so they take into account the return value of the save. Added a test explicity testing this behavior. Thanks, Jordan Ly --===============2779691464163184620==--