Re: Review Request 35638: Removed const-ref to temporaries from the Slave.

2015-06-19 Thread Michael Park

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

(Updated June 19, 2015, 7:12 p.m.)


Review request for mesos, Benjamin Hindman, Jie Yu, and Joris Van Remoortere.


Changes
---

Rebased.


Bugs: MESOS-2632
https://issues.apache.org/jira/browse/MESOS-2632


Repository: mesos


Description
---

See summary.


Diffs (updated)
-

  src/slave/slave.cpp 19b7508049beb34a8ebb7b1faf6fc0d0858ade57 

Diff: https://reviews.apache.org/r/35638/diff/


Testing
---

`make check`


Thanks,

Michael Park



Re: Review Request 35638: Removed const-ref to temporaries from the Slave.

2015-06-19 Thread Benjamin Hindman

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

Ship it!


Ship It!

- Benjamin Hindman


On June 19, 2015, 11:53 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35638/
> ---
> 
> (Updated June 19, 2015, 11:53 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Jie Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2632
> https://issues.apache.org/jira/browse/MESOS-2632
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> 
> Diffs
> -
> 
>   src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b 
> 
> Diff: https://reviews.apache.org/r/35638/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35638: Removed const-ref to temporaries from the Slave.

2015-06-19 Thread Alexander Rukletsov


> On June 19, 2015, 9:26 a.m., Alexander Rukletsov wrote:
> > src/slave/slave.cpp, line 1280
> > 
> >
> > Though currently we guarantee `executorInfo` lifetime is not shorter 
> > than `executorId`'s, I think we agreed to disallow this case as well. Any 
> > reason to make an exception here?
> 
> Michael Park wrote:
> This is the case where we want an **alias** to an object that we know 
> lives somewhere already. This is captured in the style guide already, here's 
> a snippet:
> 
> ```
> // 4: Don't use (since the T that got constructed is a temporary!).
> const T& t = T("Hello").member();
> 
> // 4: Preferred alias pattern (see below).
> const T t("Hello");
> const T& t_ = t.member();
> ```

I see. I still think it's more error-prone, while performance benefit is 
unclear to me. But it's my personal taste: your approach does not violate the 
guideline. Dropping the issue.


- Alexander


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


On June 19, 2015, 11:53 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35638/
> ---
> 
> (Updated June 19, 2015, 11:53 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Jie Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2632
> https://issues.apache.org/jira/browse/MESOS-2632
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> 
> Diffs
> -
> 
>   src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b 
> 
> Diff: https://reviews.apache.org/r/35638/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35638: Removed const-ref to temporaries from the Slave.

2015-06-19 Thread Michael Park


> On June 19, 2015, 9:26 a.m., Alexander Rukletsov wrote:
> > I think MESOS-2632 would be more appropriate.

Fixed.


> On June 19, 2015, 9:26 a.m., Alexander Rukletsov wrote:
> > src/slave/slave.cpp, line 1280
> > 
> >
> > Though currently we guarantee `executorInfo` lifetime is not shorter 
> > than `executorId`'s, I think we agreed to disallow this case as well. Any 
> > reason to make an exception here?

This is the case where we want an **alias** to an object that we know lives 
somewhere already. This is captured in the style guide already, here's a 
snippet:

```
// 4: Don't use (since the T that got constructed is a temporary!).
const T& t = T("Hello").member();

// 4: Preferred alias pattern (see below).
const T t("Hello");
const T& t_ = t.member();
```


- Michael


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


On June 19, 2015, 11:53 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35638/
> ---
> 
> (Updated June 19, 2015, 11:53 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Jie Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2632
> https://issues.apache.org/jira/browse/MESOS-2632
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> 
> Diffs
> -
> 
>   src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b 
> 
> Diff: https://reviews.apache.org/r/35638/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35638: Removed const-ref to temporaries from the Slave.

2015-06-19 Thread Michael Park

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

(Updated June 19, 2015, 11:53 a.m.)


Review request for mesos, Benjamin Hindman, Jie Yu, and Joris Van Remoortere.


Changes
---

Updated JIRA ticket.


Bugs: MESOS-2632
https://issues.apache.org/jira/browse/MESOS-2632


Repository: mesos


Description
---

See summary.


Diffs
-

  src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b 

Diff: https://reviews.apache.org/r/35638/diff/


Testing
---

`make check`


Thanks,

Michael Park



Re: Review Request 35638: Removed const-ref to temporaries from the Slave.

2015-06-19 Thread Alexander Rukletsov

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


I think MESOS-2632 would be more appropriate.


src/slave/slave.cpp (line 1280)


Though currently we guarantee `executorInfo` lifetime is not shorter than 
`executorId`'s, I think we agreed to disallow this case as well. Any reason to 
make an exception here?



src/slave/slave.cpp (line 1340)


Ditto


- Alexander Rukletsov


On June 19, 2015, 12:43 a.m., Michael Park wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35638/
> ---
> 
> (Updated June 19, 2015, 12:43 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Jie Yu, and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2629
> https://issues.apache.org/jira/browse/MESOS-2629
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> See summary.
> 
> 
> Diffs
> -
> 
>   src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b 
> 
> Diff: https://reviews.apache.org/r/35638/diff/
> 
> 
> Testing
> ---
> 
> `make check`
> 
> 
> Thanks,
> 
> Michael Park
> 
>



Re: Review Request 35638: Removed const-ref to temporaries from the Slave.

2015-06-18 Thread Michael Park

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

(Updated June 19, 2015, 12:43 a.m.)


Review request for mesos, Benjamin Hindman, Jie Yu, and Joris Van Remoortere.


Bugs: MESOS-2629
https://issues.apache.org/jira/browse/MESOS-2629


Repository: mesos


Description
---

See summary.


Diffs
-

  src/slave/slave.cpp a5ad29f59fadba919ed82ba2892c2febe551660b 

Diff: https://reviews.apache.org/r/35638/diff/


Testing
---

`make check`


Thanks,

Michael Park