----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70885/#review216094 -----------------------------------------------------------
3rdparty/libprocess/include/process/address.hpp Lines 65-68 (original), 70-74 (patched) <https://reviews.apache.org/r/70885/#comment303077> It looks a little strange that stout's functions are hostname/getHostname but libprocess' is lookup_hostname. Rather than change the name to signal the lookup, having this return a Future seems sufficient to signal the asynchronous nature of this operation (per the existing TODO): ``` Future<string> hostname = hostname(); // or Future<vector<string>> hostnames = hostnames(); ``` That way, stout's `hostname()` is the synchronous blocking way to get it, and libprocess' `hostname()` asynchronous non-blocking way to get it. I think that's generally the naming convention we'd like to stick to. - Benjamin Mahler On June 19, 2019, 2:44 p.m., Benno Evers wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70885/ > ----------------------------------------------------------- > > (Updated June 19, 2019, 2:44 p.m.) > > > Review request for mesos, Joseph Wu and Till Toenshoff. > > > Repository: mesos > > > Description > ------- > > Renamed member function `hostname()` to `lookup_hostname()`, > since the former name hides the fact that a call to this > function involves a synchronous network access in order > to make a reverse DNS lookup. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/address.hpp > e740e840c38381bafd7a1a7fcde5f963832ac1fb > 3rdparty/libprocess/src/tests/http_tests.cpp > 97aaf3ed3d4fab6d717d5c9b6d12402562ac6b46 > 3rdparty/libprocess/src/tests/ssl_tests.cpp > 6b8496aeeed79ae1bd39d7013f4f403b248fdd4c > > > Diff: https://reviews.apache.org/r/70885/diff/1/ > > > Testing > ------- > > > Thanks, > > Benno Evers > >