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



core/src/main/java/org/apache/oozie/service/ZKLocksService.java
<https://reviews.apache.org/r/23403/#comment83800>

    A few questions about this:
    
    1) If a thread acquires a readlock and another thread acquires a writelock, 
then you'll lose the readlock because they both get stored in the same HashMap 
indexed by the resource.  Perhaps we need two maps?  one for read locks and one 
for write locks?
    
    2) Isn't this going to be very slow?  acquiring and releasing any lock 
requires synchronizing on the zkLocks map.  That's a huge bottleneck.  I don't 
have a better idea though; perhaps there's some "fancier" Map from Guava that 
can help here to make it more granular?


- Robert Kanter


On July 11, 2014, 12:56 a.m., Purshotam Shah wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23403/
> -----------------------------------------------------------
> 
> (Updated July 11, 2014, 12:56 a.m.)
> 
> 
> Review request for oozie.
> 
> 
> Bugs: OOZIE-1923
>     https://issues.apache.org/jira/browse/OOZIE-1923
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> OOZIE-1923 ZKLocksService locks are not re-entrant like MemoryLocks
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/oozie/service/ZKLocksService.java d03a899 
>   core/src/test/java/org/apache/oozie/service/TestZKLocksService.java a773469 
> 
> Diff: https://reviews.apache.org/r/23403/diff/
> 
> 
> Testing
> -------
> 
> UTC
> 
> 
> Thanks,
> 
> Purshotam Shah
> 
>

Reply via email to