Re: Review Request 66140: Fixed bug in `Framework::removeOperation()`.

2018-03-22 Thread Gaston Kleiman

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

(Updated March 22, 2018, 11:26 a.m.)


Review request for mesos, Greg Mann and Zhitao Li.


Changes
---

Rebased.


Repository: mesos


Description
---

This patch makes `Framework::removeOperation()` keep
`Framework::operationUUIDs` in-sync with `Framework::operations`.


Diffs (updated)
-

  src/master/master.hpp 7e5d1df1ecb5a0db15782b2480fb7029f8a93ee2 


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

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


Testing
---

`sudo bin/mesos-tests.sh` on GNU/Linux


Thanks,

Gaston Kleiman



Re: Review Request 66140: Fixed bug in `Framework::removeOperation()`.

2018-03-20 Thread Greg Mann

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


Ship it!




Ship It!

- Greg Mann


On March 19, 2018, 6:40 p.m., Gaston Kleiman wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66140/
> ---
> 
> (Updated March 19, 2018, 6:40 p.m.)
> 
> 
> Review request for mesos, Greg Mann and Zhitao Li.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This patch makes `Framework::removeOperation()` keep
> `Framework::operationUUIDs` in-sync with `Framework::operations`.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp a54b8fab0d80806063045362079fc266afec7ac2 
> 
> 
> Diff: https://reviews.apache.org/r/66140/diff/1/
> 
> 
> Testing
> ---
> 
> `sudo bin/mesos-tests.sh` on GNU/Linux
> 
> 
> Thanks,
> 
> Gaston Kleiman
> 
>



Re: Review Request 66140: Fixed bug in `Framework::removeOperation()`.

2018-03-19 Thread Gaston Kleiman


> On March 19, 2018, 1:24 p.m., Zhitao Li wrote:
> > src/master/master.hpp
> > Lines 2628 (patched)
> > 
> >
> > A more higher level question: I wonder whether there is a more 
> > structured way to kee `Framework::operationUUIDs` and  
> > `Framework::operations` in sync.
> > 
> > 
> > [Boost.Bimap](http://www.boost.org/doc/libs/1_66_0/libs/bimap/doc/html/index.html)
> >  might be one of the possible ways? I have not used this for long and need 
> > to refresh my memory on it.

In this particular case, I don't think that using `Boost.Bimap` would have any 
benefit, for these two reasons:


1) We only need the mapping `OperationID -> UUID`. `Boost.Bimap` would also 
provide us with the mapping `UUID -> OperationID`, but we don't need it.
2) Even if we use a bimap, we would need to maintain two data structures: one 
mapping `OperationID <-> UUID` (of which we would only use the "left 
relationship"), and a map `UUID -> Operation`. So we would still need two 
structures, and we'd still have to ensure that these are kept in-sync.


- Gaston


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


On March 19, 2018, 11:40 a.m., Gaston Kleiman wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66140/
> ---
> 
> (Updated March 19, 2018, 11:40 a.m.)
> 
> 
> Review request for mesos, Greg Mann and Zhitao Li.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This patch makes `Framework::removeOperation()` keep
> `Framework::operationUUIDs` in-sync with `Framework::operations`.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp a54b8fab0d80806063045362079fc266afec7ac2 
> 
> 
> Diff: https://reviews.apache.org/r/66140/diff/1/
> 
> 
> Testing
> ---
> 
> `sudo bin/mesos-tests.sh` on GNU/Linux
> 
> 
> Thanks,
> 
> Gaston Kleiman
> 
>



Re: Review Request 66140: Fixed bug in `Framework::removeOperation()`.

2018-03-19 Thread Zhitao Li

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




src/master/master.hpp
Lines 2628 (patched)


A more higher level question: I wonder whether there is a more structured 
way to kee `Framework::operationUUIDs` and  `Framework::operations` in sync.


[Boost.Bimap](http://www.boost.org/doc/libs/1_66_0/libs/bimap/doc/html/index.html)
 might be one of the possible ways? I have not used this for long and need to 
refresh my memory on it.


- Zhitao Li


On March 19, 2018, 11:40 a.m., Gaston Kleiman wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66140/
> ---
> 
> (Updated March 19, 2018, 11:40 a.m.)
> 
> 
> Review request for mesos, Greg Mann and Zhitao Li.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This patch makes `Framework::removeOperation()` keep
> `Framework::operationUUIDs` in-sync with `Framework::operations`.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp a54b8fab0d80806063045362079fc266afec7ac2 
> 
> 
> Diff: https://reviews.apache.org/r/66140/diff/1/
> 
> 
> Testing
> ---
> 
> `sudo bin/mesos-tests.sh` on GNU/Linux
> 
> 
> Thanks,
> 
> Gaston Kleiman
> 
>



Re: Review Request 66140: Fixed bug in `Framework::removeOperation()`.

2018-03-19 Thread Mesos Reviewbot Windows

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



PASS: Mesos patch 66140 was successfully built and tested.

Reviews applied: `['63992', '63994', '65300', '64618', '66140']`

All the build artifacts available at: 
http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/66140

- Mesos Reviewbot Windows


On March 19, 2018, 6:40 p.m., Gaston Kleiman wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66140/
> ---
> 
> (Updated March 19, 2018, 6:40 p.m.)
> 
> 
> Review request for mesos, Greg Mann and Zhitao Li.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This patch makes `Framework::removeOperation()` keep
> `Framework::operationUUIDs` in-sync with `Framework::operations`.
> 
> 
> Diffs
> -
> 
>   src/master/master.hpp a54b8fab0d80806063045362079fc266afec7ac2 
> 
> 
> Diff: https://reviews.apache.org/r/66140/diff/1/
> 
> 
> Testing
> ---
> 
> `sudo bin/mesos-tests.sh` on GNU/Linux
> 
> 
> Thanks,
> 
> Gaston Kleiman
> 
>



Review Request 66140: Fixed bug in `Framework::removeOperation()`.

2018-03-19 Thread Gaston Kleiman

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

Review request for mesos, Greg Mann and Zhitao Li.


Repository: mesos


Description
---

This patch makes `Framework::removeOperation()` keep
`Framework::operationUUIDs` in-sync with `Framework::operations`.


Diffs
-

  src/master/master.hpp a54b8fab0d80806063045362079fc266afec7ac2 


Diff: https://reviews.apache.org/r/66140/diff/1/


Testing
---

`sudo bin/mesos-tests.sh` on GNU/Linux


Thanks,

Gaston Kleiman