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


Fix it, then Ship it!




Also, can you link this with a ticket for following up on the copy-on-write 
type change?


src/common/resources.cpp
Lines 1641-1659 (original), 1655-1677 (patched)
<https://reviews.apache.org/r/68639/#comment293015>

    Shouldn't these be `const Resource_Unsafe&`? Ditto for the other file.


- Benjamin Mahler


On Sept. 14, 2018, 10:11 p.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68639/
> -----------------------------------------------------------
> 
> (Updated Sept. 14, 2018, 10:11 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, and Gastón 
> Kleiman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Due to the copy-on-write optimization (MESOS-6765), one needs to
> check the `use_count` of `Resource_` before mutating. Currently,
> there is no mechanism to enforce this. As a short-term mitigation
> measure, we rename `resources` to
> `resourcesNoMutationWithoutExclusiveOwnership` and typedef its item
> type to `Resource_UnSafe`
> to alert people about obtaining an exclusive ownership before mutating
> the `Resource_` objects.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 6f81b14f8bc090a144eeae8f15639c370366166d 
>   include/mesos/v1/resources.hpp 09110530da16678abf6bf6b308906dd8ccc8180a 
>   src/common/resources.cpp 3e63cdedb9261970dbeb9bb9f97eed65819f68a7 
>   src/v1/resources.cpp 3683a331e0859cd6f2ad061db6ba67112ecfcb0d 
> 
> 
> Diff: https://reviews.apache.org/r/68639/diff/3/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>

Reply via email to