mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 66860: Avoid copying of register framework messages in the master.
Date Tue, 01 May 2018 01:20:53 GMT

-----------------------------------------------------------
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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message