In the uncontended case this is fine, although you are doing 4 RPCs to accomplish what could be done in 1 (with CAS).
But in the contended case, all the people waiting on that lock consume RPC handler threads eventually causing a temporary deadlock since the original lockholder will not be able to progress to release the lock. The 60 second release will kick in and things might flow again for a bit. On Fri, Jul 16, 2010 at 2:07 PM, Justin Cohen <justin.co...@teamaol.com> wrote: > What kind of trouble? I do quite a bit of: > > l = lock(row); > val = get(row); > /* modify val */ > put(row, val); > unlock(l); > > Is there an alternative? > > -justin > > On 7/16/10 4:02 PM, Ryan Rawson wrote: >> >> Also be very wary of using any >> of the explicit row locking calls, they are generally trouble for more >> or less everyone. >