You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by James Peach <jp...@apache.org> on 2019/06/19 05:06:02 UTC
Review Request 70881: Improve master CHECK messages.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70881/
-----------------------------------------------------------
Review request for mesos, Benjamin Mahler and Greg Mann.
Repository: mesos
Description
-------
For master CHECKs that fail by looking up some unique key, log
the key to aid debugging.
Diffs
-----
src/master/master.cpp 8a238aa1d5592f91d8c3b3c443aa30acd3a0cfd0
Diff: https://reviews.apache.org/r/70881/diff/1/
Testing
-------
make check (Fedora 30)
Thanks,
James Peach
Re: Review Request 70881: Improve master CHECK messages.
Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70881/#review215959
-----------------------------------------------------------
Patch looks great!
Reviews applied: [70881]
Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers --disable-parallel-test-execution' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh
- Mesos Reviewbot
On June 19, 2019, 5:06 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70881/
> -----------------------------------------------------------
>
> (Updated June 19, 2019, 5:06 a.m.)
>
>
> Review request for mesos, Benjamin Mahler and Greg Mann.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> For master CHECKs that fail by looking up some unique key, log
> the key to aid debugging.
>
>
> Diffs
> -----
>
> src/master/master.cpp 8a238aa1d5592f91d8c3b3c443aa30acd3a0cfd0
>
>
> Diff: https://reviews.apache.org/r/70881/diff/1/
>
>
> Testing
> -------
>
> make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 70881: Improve master CHECK messages.
Posted by James Peach <jp...@apache.org>.
> On June 19, 2019, 5:41 p.m., Greg Mann wrote:
> > src/master/master.cpp
> > Line 4346 (original), 4346 (patched)
> > <https://reviews.apache.org/r/70881/diff/1/?file=2151245#file2151245line4346>
> >
> > Nit: you could use `CHECK_NE` here and elsewhere instead of just `CHECK`?
>
> James Peach wrote:
> Good point, I'll give that a try. IME `CHECK_NE` on pointers doesn't always compile :)
```
../3rdparty/glog-0.4.0/src/glog/logging.h:720:1: required from ‘std::string* google::Check_NEImpl(const T1&, const T2&, const char*) [with T1 = mesos::internal::master::Slave*; T2 = std::nullptr_t; std::string = std::__cxx11::basic_string<char>]’
../../src/master/master.cpp:4346:3: required from here
../3rdparty/glog-0.4.0/src/glog/logging.h:640:9: error: ambiguous overload for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::nullptr_t’)
640 | (*os) << v;
| ~~~~~~^~~~
```
In `master.cpp`, there are a lot of other places that do `CHECK(foo != nullptr)`.
- James
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70881/#review215973
-----------------------------------------------------------
On June 19, 2019, 5:06 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70881/
> -----------------------------------------------------------
>
> (Updated June 19, 2019, 5:06 a.m.)
>
>
> Review request for mesos, Benjamin Mahler and Greg Mann.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> For master CHECKs that fail by looking up some unique key, log
> the key to aid debugging.
>
>
> Diffs
> -----
>
> src/master/master.cpp 8a238aa1d5592f91d8c3b3c443aa30acd3a0cfd0
>
>
> Diff: https://reviews.apache.org/r/70881/diff/1/
>
>
> Testing
> -------
>
> make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 70881: Improve master CHECK messages.
Posted by James Peach <jp...@apache.org>.
> On June 19, 2019, 5:41 p.m., Greg Mann wrote:
> > src/master/master.cpp
> > Line 4346 (original), 4346 (patched)
> > <https://reviews.apache.org/r/70881/diff/1/?file=2151245#file2151245line4346>
> >
> > Nit: you could use `CHECK_NE` here and elsewhere instead of just `CHECK`?
Good point, I'll give that a try. IME `CHECK_NE` on pointers doesn't always compile :)
- James
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70881/#review215973
-----------------------------------------------------------
On June 19, 2019, 5:06 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70881/
> -----------------------------------------------------------
>
> (Updated June 19, 2019, 5:06 a.m.)
>
>
> Review request for mesos, Benjamin Mahler and Greg Mann.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> For master CHECKs that fail by looking up some unique key, log
> the key to aid debugging.
>
>
> Diffs
> -----
>
> src/master/master.cpp 8a238aa1d5592f91d8c3b3c443aa30acd3a0cfd0
>
>
> Diff: https://reviews.apache.org/r/70881/diff/1/
>
>
> Testing
> -------
>
> make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 70881: Improve master CHECK messages.
Posted by James Peach <jp...@apache.org>.
> On June 19, 2019, 5:41 p.m., Greg Mann wrote:
> > src/master/master.cpp
> > Line 4346 (original), 4346 (patched)
> > <https://reviews.apache.org/r/70881/diff/1/?file=2151245#file2151245line4346>
> >
> > Nit: you could use `CHECK_NE` here and elsewhere instead of just `CHECK`?
>
> James Peach wrote:
> Good point, I'll give that a try. IME `CHECK_NE` on pointers doesn't always compile :)
>
> James Peach wrote:
> ```
> ../3rdparty/glog-0.4.0/src/glog/logging.h:720:1: required from ‘std::string* google::Check_NEImpl(const T1&, const T2&, const char*) [with T1 = mesos::internal::master::Slave*; T2 = std::nullptr_t; std::string = std::__cxx11::basic_string<char>]’
> ../../src/master/master.cpp:4346:3: required from here
> ../3rdparty/glog-0.4.0/src/glog/logging.h:640:9: error: ambiguous overload for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::nullptr_t’)
> 640 | (*os) << v;
> | ~~~~~~^~~~
> ```
>
>
> In `master.cpp`, there are a lot of other places that do `CHECK(foo != nullptr)`.
Dropping this issue, since `CHECK_NE` doesn't compile :)
- James
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70881/#review215973
-----------------------------------------------------------
On June 19, 2019, 5:06 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70881/
> -----------------------------------------------------------
>
> (Updated June 19, 2019, 5:06 a.m.)
>
>
> Review request for mesos, Benjamin Mahler and Greg Mann.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> For master CHECKs that fail by looking up some unique key, log
> the key to aid debugging.
>
>
> Diffs
> -----
>
> src/master/master.cpp 8a238aa1d5592f91d8c3b3c443aa30acd3a0cfd0
>
>
> Diff: https://reviews.apache.org/r/70881/diff/1/
>
>
> Testing
> -------
>
> make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>
Re: Review Request 70881: Improve master CHECK messages.
Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70881/#review215973
-----------------------------------------------------------
Fix it, then Ship it!
src/master/master.cpp
Line 4346 (original), 4346 (patched)
<https://reviews.apache.org/r/70881/#comment302892>
Nit: you could use `CHECK_NE` here and elsewhere instead of just `CHECK`?
- Greg Mann
On June 19, 2019, 5:06 a.m., James Peach wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70881/
> -----------------------------------------------------------
>
> (Updated June 19, 2019, 5:06 a.m.)
>
>
> Review request for mesos, Benjamin Mahler and Greg Mann.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> For master CHECKs that fail by looking up some unique key, log
> the key to aid debugging.
>
>
> Diffs
> -----
>
> src/master/master.cpp 8a238aa1d5592f91d8c3b3c443aa30acd3a0cfd0
>
>
> Diff: https://reviews.apache.org/r/70881/diff/1/
>
>
> Testing
> -------
>
> make check (Fedora 30)
>
>
> Thanks,
>
> James Peach
>
>