mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaston Kleiman <gas...@mesosphere.io>
Subject Re: Review Request 65962: Avoided copying `Owned` pointers in the default executor.
Date Thu, 08 Mar 2018 22:00:38 GMT

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

(Updated March 8, 2018, 2 p.m.)


Review request for mesos and Joseph Wu.


Changes
-------

Addressed Benjamin's feedback.


Summary (updated)
-----------------

Avoided copying `Owned` pointers in the default executor.


Repository: mesos


Description (updated)
-------

`Owned` pointers are copied in multiple places of the default executor.
This violates the semantic of owned pointers and works only because
`Owned` is currently implemented with `shared_ptr`, it would otherwise
lead to double-freeing the pointers.

This patch changes those places to use references to the original
`Owned` objects or raw pointers instead of copies.


Diffs (updated)
-----

  src/launcher/default_executor.cpp 906836f3b8e0af79d7c61f90fd8a95f193b26e84 


Diff: https://reviews.apache.org/r/65962/diff/2/

Changes: https://reviews.apache.org/r/65962/diff/1-2/


Testing
-------

`sudo bin/mesos-tests.sh --gtest_filter="*Default*"` on GNU/Linux


Thanks,

Gaston Kleiman


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