> 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
>
>