From reviews-return-62736-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Wed Jun 28 14:56:46 2017 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 71D9F1A792 for ; Wed, 28 Jun 2017 14:56:46 +0000 (UTC) Received: (qmail 54581 invoked by uid 500); 28 Jun 2017 14:56:46 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 54552 invoked by uid 500); 28 Jun 2017 14:56:46 -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 54540 invoked by uid 99); 28 Jun 2017 14:56:46 -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, 28 Jun 2017 14:56:46 +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 A205A1A04BF; Wed, 28 Jun 2017 14:56:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.25 X-Spam-Level: *** X-Spam-Status: No, score=3.25 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id pLd1VVLKycly; Wed, 28 Jun 2017 14:56:43 +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 8D18B5FB96; Wed, 28 Jun 2017 14:56:43 +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 2CCC7E0026; Wed, 28 Jun 2017 14:56:43 +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 1E9FFC40062; Wed, 28 Jun 2017 14:56:43 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0939778568489048301==" MIME-Version: 1.0 Subject: Re: Review Request 60008: Fixed bug causing FUTURE_DISPATCH to react on irrelevant dispatch. From: Andrei Budnik To: Neil Conway , Michael Park , Alexander Rukletsov Cc: Mesos Reviewbot Windows , Andrei Budnik , mesos Date: Wed, 28 Jun 2017 14:56:43 -0000 Message-ID: <20170628145643.43244.54962@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Andrei Budnik X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/60008/ X-Sender: Andrei Budnik References: <20170626141552.43241.59944@reviews-vm2.apache.org> In-Reply-To: <20170626141552.43241.59944@reviews-vm2.apache.org> Reply-To: Andrei Budnik X-ReviewRequest-Repository: mesos --===============0939778568489048301== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On June 26, 2017, 2:15 p.m., Alexander Rukletsov wrote: > > 3rdparty/libprocess/include/process/dispatch.hpp > > Lines 68 (patched) > > > > > > Why don't you use `Option<>`? Fixed. > On June 26, 2017, 2:15 p.m., Alexander Rukletsov wrote: > > 3rdparty/libprocess/include/process/event.hpp > > Lines 178-179 (patched) > > > > > > Please a blank line here, i.e., > > ``` > > // Any society that would give up a little liberty to gain > > // a little security will deserve neither and lose both. > > // > > // TODO(abudnik): Add a source link for the quote above. > > ``` Fixed. > On June 26, 2017, 2:15 p.m., Alexander Rukletsov wrote: > > 3rdparty/libprocess/src/tests/process_tests.cpp > > Line 189 (original), 190-192 (patched) > > > > > > We strive to add a descriptive comment for each test. Even though it is not an easy to go and add comments to existing tests, we do want to have a proper description for every newly added test. Done. > On June 26, 2017, 2:15 p.m., Alexander Rukletsov wrote: > > 3rdparty/libprocess/src/tests/process_tests.cpp > > Lines 204-205 (patched) > > > > > > Why do you need this statement? This declares expectations about test behaviour. See next test THREADSAFE_Defer1 which uses EXPECT_CALL as well. > On June 26, 2017, 2:15 p.m., Alexander Rukletsov wrote: > > 3rdparty/libprocess/src/tests/process_tests.cpp > > Lines 208-209 (patched) > > > > > > Additionally to (or actually instead of) `EXPECT` here, `AWAIT_READY(f);` would carry your intent better, I think. I would actually get rid of call expectations all together and simply focus on future states. Fixed. - Andrei ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60008/#review178888 ----------------------------------------------------------- On June 28, 2017, 2:56 p.m., Andrei Budnik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60008/ > ----------------------------------------------------------- > > (Updated June 28, 2017, 2:56 p.m.) > > > Review request for mesos, Alexander Rukletsov, Michael Park, and Neil Conway. > > > Bugs: MESOS-5886 > https://issues.apache.org/jira/browse/MESOS-5886 > > > Repository: mesos > > > Description > ------- > > FUTURE_DISPATCH uses DispatchMatcher to figure out whether a processed > DispatchEvent is the same the user is waiting for. Currently, we > compare std::type_info of function pointers, which is not enough: > different class methods with same signatures will be matched (see > MESOS-5886 for an example). > This patch adds value of pointer-to-member function in addition to > std::type_info in DispatchEvent to uniquely identify class methods. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/dispatch.hpp 3a0793888dc0df5e3ec31b06f47cd920c71e0db9 > 3rdparty/libprocess/include/process/event.hpp 8afe6266eb0dc5a17af35d79efb6bfdf9e6a0ee9 > 3rdparty/libprocess/include/process/gmock.hpp e9af943b39436f365fe687301febb5c7fbefffc4 > 3rdparty/libprocess/src/process.cpp 8ff37d1b5781c42f96be2da391ed000158eea7b8 > 3rdparty/libprocess/src/tests/process_tests.cpp 38d787a083a5eb31e922d283f4b4bed2bd62eb0a > > > Diff: https://reviews.apache.org/r/60008/diff/2/ > > > Testing > ------- > > 1. make check (mac os x 10.12, fedora 25) > 2. internal CI > > NOTE: Test GroupTest.ConnectTimer is broken, because it uses FUTURE_DISPATCH on a wrong method (GroupProcess::expired), > which has the same signature as a private method (GroupProcess::timedout). The later method is actually called, > thus causing the error after applying this patch. > > > Thanks, > > Andrei Budnik > > --===============0939778568489048301==--