> On Feb. 8, 2018, 2:49 p.m., Gaston Kleiman wrote:
> > src/checks/checker_process.cpp
> > Lines 333-339 (patched)
> > <https://reviews.apache.org/r/65395/diff/3/?file=1954605#file1954605line352>
> >
> >     In my opinion the following is easier to understand:
> >     
> >     ```
> >     #ifdef __WINDOWS__
> >                 // Case E
> >                 return dockerHttpCheck(http, d);
> >     #else
> >                 // Case B*
> >                 return httpCheck(http, runtime::Plain{d.namespaces, 
> > d.taskPid});
> >     #endif // __WINDOWS__
> >     ```
> >     
> >     And I'd do the same elsewhere.
> >     
> >     I wonder what Andy and Alex think about this.
> 
> Alexander Rukletsov wrote:
>     Alex does not have a strong opinion, but tends to avoid negation if 
> possible.

Andy's opinion, in this case, is to use `#ifdef Windows / #else`, because I 
also avoid negation where possible.

However, there are places where `#ifndef Windows` is required because `#ifdef 
Linux` isn't correct. This just isn't one of them.


- Andrew


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


On Feb. 8, 2018, 9:49 a.m., Akash Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65395/
> -----------------------------------------------------------
> 
> (Updated Feb. 8, 2018, 9:49 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Andrew Schwartzmeyer, and 
> Gaston Kleiman.
> 
> 
> Bugs: MESOS-8498
>     https://issues.apache.org/jira/browse/MESOS-8498
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Refactored health check code to separate the logic for each check
> type and runtime (Plain/Docker/Nested). Now the matrix of different
> possiblilites is cleanly enumerated, making it easier to add
> future health checks, such as the ones for Windows.
> 
> 
> Diffs
> -----
> 
>   src/checks/checker.hpp 93502270f31e80c5f7c94b5b456625e9cdea1837 
>   src/checks/checker.cpp fff0aac504b4283a210f936e00c977fa60d88b3d 
>   src/checks/checker_process.hpp 510f3b2e6e689faaf26595214ce377c2b5518f28 
>   src/checks/checker_process.cpp ddb197b8cc2c503fef5ae20af32f5881fff9833f 
>   src/checks/health_checker.hpp 019fbd791f250ecc28ff59d779f90e7ccbf0c685 
>   src/checks/health_checker.cpp eaf9a18817eeeff7c29c7a4b9d1b183f398760a3 
>   src/docker/executor.cpp e4c53d558e414e50b1c429fba8e31e504c63744a 
>   src/launcher/default_executor.cpp 4a619859095cc2d30f4806813f64a2e48c83b3ea 
>   src/launcher/executor.cpp 050f5a057f360873e2b4738b126289bcd1bd0c7f 
> 
> 
> Diff: https://reviews.apache.org/r/65395/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Akash Gupta
> 
>

Reply via email to