-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72786/#review221727
-----------------------------------------------------------
src/master/allocator/mesos/offer_constraints_filter.hpp
Lines 27 (patched)
<https://reviews.apache.org/r/72786/#comment310784>
Hm.. why is this decoupled into a different header from OfferConstraintsFilter? Is it
to minimize the stuff pulled into master.hpp? If so, not sure if that's worth the extra indirection?
src/master/allocator/mesos/offer_constraints_filter.cpp
Lines 53-55 (patched)
<https://reviews.apache.org/r/72786/#comment310781>
Doesn't look like shared_ptr makes sense in this patch?
src/master/allocator/mesos/offer_constraints_filter.cpp
Lines 63-64 (patched)
<https://reviews.apache.org/r/72786/#comment310783>
How about opening and closing quote on same line?
```
return Error(
"Failed to construct regex from pattern"
" '" + regex + "': " + re2->error());
```
src/master/allocator/mesos/offer_constraints_filter.cpp
Lines 68 (patched)
<https://reviews.apache.org/r/72786/#comment310782>
No period at the end
Can we include the program size value and max?
E.g.
Regex 'foo|bar' is too complex: program size of 112 vs maximum of 100 allowed via --offer_constraints_re2_max_program_size
src/master/constants.hpp
Lines 185-188 (patched)
<https://reviews.apache.org/r/72786/#comment310786>
Helpful! Probably we should mention which RE2 library version for these numbers, since
I've read from discussion on github that the numbers have been observed to change across releases.
src/master/constants.hpp
Lines 189 (patched)
<https://reviews.apache.org/r/72786/#comment310785>
Or Kilobytes(4)?
src/tests/master/offer_constraints_filter_tests.cpp
Lines 46 (patched)
<https://reviews.apache.org/r/72786/#comment310780>
Should we have the type of this also be Bytes, or clarify the units in the name?
```
options.re2Limits.maxMem = Kilobytes(4);
```
```
options.re2Limits.maxMemInBytes = 4 * 1024;
```
- Benjamin Mahler
On Aug. 26, 2020, 12:23 p.m., Andrei Sekretenko wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72786/
> -----------------------------------------------------------
>
> (Updated Aug. 26, 2020, 12:23 p.m.)
>
>
> Review request for mesos and Benjamin Mahler.
>
>
> Bugs: MESOS-10173
> https://issues.apache.org/jira/browse/MESOS-10173
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Implemented regex-based offer constraints.
>
>
> Diffs
> -----
>
> include/mesos/allocator/allocator.hpp 05d0e9c46485c3048a65d46747d56e715883a0b3
> src/Makefile.am 8b95611baff2f925910ea46addf462cf9f33071b
> src/master/allocator/mesos/offer_constraints_filter.hpp PRE-CREATION
> src/master/allocator/mesos/offer_constraints_filter.cpp d724fd0a9832feea26f6db1a498b6bdee83ffff0
> src/master/constants.hpp c384b6878193a4b6bb09294d8b14757906595c1b
> src/master/flags.hpp 78623d68bf428cd3f52684303d98a525d42eb878
> src/master/flags.cpp 74f4daadd48e8e691be43759b88dc8b3c2df489a
> src/master/master.hpp e478f805069813532011f2a1991ab1f847080516
> src/master/master.cpp 4428985902512eea1c97205f04a4fed6c16d494e
> src/tests/master/offer_constraints_filter_tests.cpp 84a1e917a52d0b98f979e454c2b982c6402b0176
>
>
> Diff: https://reviews.apache.org/r/72786/diff/7/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Andrei Sekretenko
>
>
|