> On March 19, 2018, 1:24 p.m., Zhitao Li wrote:
> > src/master/master.hpp
> > Lines 2628 (patched)
> > <https://reviews.apache.org/r/66140/diff/1/?file=1982482#file1982482line2628>
> >
> >     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
> 
>

Reply via email to