From commits-return-74250-archive-asf-public=cust-asf.ponee.io@beam.apache.org Wed May 23 22:33:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 24B6718067A for ; Wed, 23 May 2018 22:33:03 +0200 (CEST) Received: (qmail 10312 invoked by uid 500); 23 May 2018 20:33:03 -0000 Mailing-List: contact commits-help@beam.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.apache.org Delivered-To: mailing list commits@beam.apache.org Received: (qmail 10303 invoked by uid 99); 23 May 2018 20:33:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2018 20:33:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D4320C2AEE for ; Wed, 23 May 2018 20:33:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id ySq7xVCRgKNX for ; Wed, 23 May 2018 20:33:02 +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 823335F544 for ; Wed, 23 May 2018 20:33:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8AED8E0CA5 for ; Wed, 23 May 2018 20:33:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3D1C121097 for ; Wed, 23 May 2018 20:33:00 +0000 (UTC) Date: Wed, 23 May 2018 20:33:00 +0000 (UTC) From: "Kenneth Knowles (JIRA)" To: commits@beam.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BEAM-2980) BagState.isEmpty needs a tighter spec MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BEAM-2980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16487985#comment-16487985 ] Kenneth Knowles commented on BEAM-2980: --------------------------------------- I can dig that perspective, too. The issue hitting users is probably that "current" isn't as obvious to them. Unfortunately I don't see a good transcript anywhere of the conversation between the options of "XYZState is always a changing view of an underlying ref cell" versus having a future-like API. It does see that the utility of readLater() is tied to a particular implementation strategy wherein local changes are buffered separately from whatever is read because of the hint. TBH I just think futures are simpler. But I see that you'd need to refactor bits of the API, for prefetching hint methods to cause futures to be delivered elsewhere, versus imperative readLater() calls in the prefetch methods. > BagState.isEmpty needs a tighter spec > ------------------------------------- > > Key: BEAM-2980 > URL: https://issues.apache.org/jira/browse/BEAM-2980 > Project: Beam > Issue Type: Bug > Components: beam-model > Reporter: Kenneth Knowles > Assignee: Daniel Mills > Priority: Major > > Consider the following: > {code} > BagState myBag = // empty > ReadableState isMyBagEmpty = myBag.isEmpty(); > myBag.add(bizzle); > bool empty = isMyBagEmpty.read(); > {code} > Should {{empty}} be true or false? We need a consistent answer, across all kinds of state, when snapshots are required. -- This message was sent by Atlassian JIRA (v7.6.3#76005)