> On June 7, 2016, 10:48 a.m., Jie Yu wrote: > > src/slave/slave.cpp, lines 3943-3950 > > <https://reviews.apache.org/r/47660/diff/2/?file=1395790#file1395790line3943> > > > > I don't understand this change. Can you describe the motivation in the > > description of this rb? For instance, what if both > > task.command().has_user() and frameworkInfo.has_user() are false?
Just fix the redundant check because has_user() always true. Please see commit description. - Gilbert ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47660/#review136505 ----------------------------------------------------------- On June 13, 2016, 4:45 p.m., Gilbert Song wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47660/ > ----------------------------------------------------------- > > (Updated June 13, 2016, 4:45 p.m.) > > > Review request for mesos, Artem Harutyunyan, Jie Yu, James Peach, Kevin > Klues, and Timothy Chen. > > > Repository: mesos > > > Description > ------- > > Since the 'user' in 'FrameworkInfo' is a required field, > so 'fromeworkInfo.has_user()' is always true. Currently > in our semantics, if the operator specifies the framework > user as an empty string, mesos will automagically set it > as the current host user. So the slave will always obtain > the user from 'FrameworkInfo', and 'switch_user' defaults > to be true from agent flag. We would prefer not to change > this semantics because a long deprecation cycle is needed. > So in this patch, we just fix the redundant check in slave > 'getExecutorInfo' logic. > > > Diffs > ----- > > src/slave/slave.cpp d635dd2c6f6fce5a9eeefc5dcdf84e00cdc833b6 > > Diff: https://reviews.apache.org/r/47660/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Gilbert Song > >
