> On July 22, 2012, 4:32 p.m., John Sirois wrote:
> > src/java/src/org/apache/mesos/state/InMemoryState.java, line 64
> > <https://reviews.apache.org/r/6079/diff/3/?file=125949#file125949line64>
> >
> >     This implementation is non-atomic which violates the State contract.  A 
> > few things to conder, HashMap is fully synchronized and buys you nothing 
> > for check and act.  What you want is found in 
> > java.util.concurrent.ConcurrentMap#replace

Sorry about that - Hashtable is fully synchronized, but you don't use that - 
you use HashMap.  The fundamental issue of non-atomicity in get and set still 
stands.


- John


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


On July 22, 2012, 4:37 a.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/6079/
> -----------------------------------------------------------
> 
> (Updated July 22, 2012, 4:37 a.m.)
> 
> 
> Review request for mesos, John Sirois and Florian Leibert.
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 10f1101 
>   src/java/src/org/apache/mesos/state/InMemoryState.java PRE-CREATION 
>   src/java/src/org/apache/mesos/state/Variable.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/6079/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>

Reply via email to