> On Feb. 3, 2016, 5:11 p.m., Jiang Yan Xu wrote:
> > 3rdparty/libprocess/src/process.cpp, lines 2207-2208
> > <https://reviews.apache.org/r/43149/diff/2/?file=1231902#file1231902line2207>
> >
> >     Since we do LOG(WARNING) instead of LOG(FATAL), maybe say the below so 
> > it's clear that we ignored the variable and moved on with the default value.
> >     
> >     `"Ignoring invalid value " << value.get() << " for 
> > LIBPROCESS_THREAD_COUNT";`
> 
> Guangya Liu wrote:
>     What about adding more info for trouble shooting? Such as `"Ignoring 
> invalid value " << value.get() << " for LIBPROCESS_THREAD_COUNT, using system 
> defined value " << cpus;`
> 
> haosdent huang wrote:
>     +1

Hmm... either this or we just EXIT(EXIT_FAILURE). I am leaning towards the 
latter after thinking about it a bit more. It's also more consistent with 
practices in this file: e.g. when LIBPROCESS_PORT is invalid we don't use the 
default port (and elsewhere in the project).


> On Feb. 3, 2016, 5:11 p.m., Jiang Yan Xu wrote:
> > 3rdparty/libprocess/src/process.cpp, line 2203
> > <https://reviews.apache.org/r/43149/diff/2/?file=1231902#file1231902line2203>
> >
> >     `Try<size_t> count = numify<size_t>(...)` since the thread count is an 
> > uint?

My bad for suggesting using numify<size_t>. Seems like numify<size_t> actually 
is going to underflow for a negative long and output a large number. So we 
ought to keep using long and do boundary checks explicitly. i.e. count.get() > 0


- Jiang Yan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43149/#review117725
-----------------------------------------------------------


On Feb. 3, 2016, 4:40 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43149/
> -----------------------------------------------------------
> 
> (Updated Feb. 3, 2016, 4:40 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-4592
>     https://issues.apache.org/jira/browse/MESOS-4592
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Check the LIBPROCESS_THREAD_COUNT environment variable to determine
> the number of threads in the libprocess thread pool.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp 
> 65a247a5bc7cf0bd6f23f6fc5c349ecce60f5ec0 
> 
> Diff: https://reviews.apache.org/r/43149/diff/
> 
> 
> Testing
> -------
> 
> make check on OS X. Running in production for many months.
> 
> 
> Thanks,
> 
> James Peach
> 
>

Reply via email to