You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Mahler <bm...@apache.org> on 2018/05/01 01:20:53 UTC

Re: Review Request 66860: Avoid copying of register framework messages in the master.

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




src/master/master.cpp
Line 2488 (original), 2489 (patched)
<https://reviews.apache.org/r/66860/#comment283856>

    I believe `std::move(const T& t)` will return `const T&&` at which point we're still copying it into the call?
    
    This could be:
    
    ```
    *call.mutable_framework_info() =
      std::move(*registerFrameworkMessage.mutable_framework());
      
    // Or
    
    FrameworkInfo frameworkInfo =
      std::move(*registerFrameworkMessage.mutable_framework());
      
    ...
    
    *call.mutable_framework_info() = std::move(frameworkInfo);
    ```


- Benjamin Mahler


On April 30, 2018, 9:47 p.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66860/
> -----------------------------------------------------------
> 
> (Updated April 30, 2018, 9:47 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-8628
>     https://issues.apache.org/jira/browse/MESOS-8628
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Prior to this patch, the register framework message was copied
> into a subscribe call. This updates the handler to perform moves
> instead.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp c30cf082d9ddf2e5dd97e0d887d6d07d8e03cbd4 
>   src/master/master.cpp c723a291ed8d219ced4492bc905ac6b52683ae47 
> 
> 
> Diff: https://reviews.apache.org/r/66860/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>