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 655AB200CE3 for ; Sun, 30 Jul 2017 04:44:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 63C08164884; Sun, 30 Jul 2017 02:44:02 +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 8194B164882 for ; Sun, 30 Jul 2017 04:44:01 +0200 (CEST) Received: (qmail 25311 invoked by uid 500); 30 Jul 2017 02:44:00 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 25272 invoked by uid 99); 30 Jul 2017 02:44:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Jul 2017 02:44:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 9B2C5C0096; Sun, 30 Jul 2017 02:43:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.249 X-Spam-Level: **** X-Spam-Status: No, score=4.249 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, MANY_SPAN_IN_TEXT=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id AeWv_1RNUJlD; Sun, 30 Jul 2017 02:43:55 +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 AFCA95F5B3; Sun, 30 Jul 2017 02:43:54 +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 4213EE0059; Sun, 30 Jul 2017 02:43:54 +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 C3F38C401D3; Sun, 30 Jul 2017 02:43:53 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7984874962819824019==" MIME-Version: 1.0 Subject: Re: Review Request 61147: Added Future::onAbandoned and Future::isAbandoned. From: Benjamin Mahler To: Benjamin Mahler Cc: Benjamin Hindman , mesos Date: Sun, 30 Jul 2017 02:43:53 -0000 Message-ID: <20170730024353.15041.51456@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Benjamin Mahler X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/61147/ X-Sender: Benjamin Mahler X-ReviewBoard-ShipIt: 1 References: <20170727015520.51161.68740@reviews-vm2.apache.org> In-Reply-To: <20170727015520.51161.68740@reviews-vm2.apache.org> Reply-To: Benjamin Mahler X-ReviewRequest-Repository: mesos archived-at: Sun, 30 Jul 2017 02:44:02 -0000 --===============7984874962819824019== 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/61147/#review181762 ----------------------------------------------------------- Fix it, then Ship it! 3rdparty/libprocess/include/process/future.hpp Lines 84-88 (original), 84-88 (patched) This could use some discussion about abandonement, there doesn't seem to be any that talks about what abandonment is? (I guess you'll have to seed this since the current documentation is lacking). In particular, what I found helpful was to think about it as: a pending future can be abandoned (rather than abandoment being a terminal state). Maybe also a TODO about what we would do if we were designing future from scratch? Would we make abandonment a state that is captured by onAny? 3rdparty/libprocess/include/process/future.hpp Line 1059 (original), 1108-1109 (patched) A high level comment about what propagating means here would be great! (maybe an example to make it even more clear?) 3rdparty/libprocess/include/process/queue.hpp Lines 57-69 (original), 57-66 (patched) Commit this separately? I think it was written the original way to avoid needing an UNREACHABLE? 3rdparty/libprocess/include/process/queue.hpp Line 59 (original), 57 (patched) It's funny, now that dispatching is lock free, I suspect that the Process-based implementation of Pipe would be faster than the locking approach! This is potentially true across other components, like process::Queue! 3rdparty/libprocess/src/http.cpp Lines 422-441 (original), 422-438 (patched) Ditto here w.r.t. committing separately. I also thought this was written the original way to avoid UNREACHABLE. 3rdparty/libprocess/src/tests/collect_tests.cpp Lines 114-127 (original), 114-131 (patched) What happened here? 3rdparty/libprocess/src/tests/collect_tests.cpp Lines 229-243 (original), 233-250 (patched) Ditto here. 3rdparty/libprocess/src/tests/future_tests.cpp Lines 558 (patched) EXPECT not abandoned before you reset the promise? 3rdparty/libprocess/src/tests/metrics_tests.cpp Lines 77-80 (original), 78-85 (patched) Just curious, does it matter that the pending future is abandoned? 3rdparty/libprocess/src/tests/process_tests.cpp Line 176 (original), 177 (patched) Commit separately? 3rdparty/libprocess/src/tests/process_tests.cpp Line 216 (original), 215 (patched) Commit this and the using statement separately? 3rdparty/libprocess/src/tests/shared_tests.cpp Line 93 (original), 94 (patched) Commit this and the using statement separately? - Benjamin Mahler On July 27, 2017, 1:55 a.m., Benjamin Hindman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61147/ > ----------------------------------------------------------- > > (Updated July 27, 2017, 1:55 a.m.) > > > Review request for mesos and Benjamin Mahler. > > > Repository: mesos > > > Description > ------- > > Added Future::onAbandoned and Future::isAbandoned. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/future.hpp cce950509f58022e79bb51a6e72ea1a005b9cb50 > 3rdparty/libprocess/include/process/queue.hpp ab08e30df742412f22a06202526f8b55350ed435 > 3rdparty/libprocess/src/http.cpp a4d71fb6c345d3c7a7611004830f6c2c0fbf6046 > 3rdparty/libprocess/src/tests/collect_tests.cpp 155e0bb75cf723a0a6c29020f9f767e3ba3d7401 > 3rdparty/libprocess/src/tests/future_tests.cpp 0c8725b9a5e64aaac6e3979e450a11e84f9bd45e > 3rdparty/libprocess/src/tests/metrics_tests.cpp 161ca0dc7aea526d450d71a80839d8cc075aaa31 > 3rdparty/libprocess/src/tests/process_tests.cpp ed11909a2a5e3214fa974bdea098f4057cea9666 > 3rdparty/libprocess/src/tests/shared_tests.cpp 2a2ffe76b7b7ce016b559de7b5d3a28a06f422ef > > > Diff: https://reviews.apache.org/r/61147/diff/1/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Hindman > > --===============7984874962819824019==--