[infinispan-dev] Asymmetric logging for lock aquisition attempt and success/failure

Manik Surtani manik at jboss.org
Wed Jan 27 11:15:20 EST 2010


On 27 Jan 2010, at 14:03, Galder Zamarreno wrote:

> Hi,
> 
> I'm trying to track down an elusive random bug and I've noticed that in 
> LockManagerImpl, we print:
> 
>       if (trace) log.trace("Attempting to lock {0} with acquisition 
> timeout of {1} millis", key, lockTimeout);
> 
> But whether this succeeded or not is logged in clients of lockAndRecord, 
> i.e. EntryFactoryImpl:
> 
>          if (lockManager.lockAndRecord(key, ctx)) {
>             // successfully locked!
>             if (trace) log.trace("Successfully acquired lock!");
>             return true;
> 
> It'd be better if the success/failure was logged in LockManagerImpl, so 
> that you can simply enable TRACE on LockManagerImpl, rather than having 
> to do that in that class and also in any client class calling 
> lockAndRecord().
> 
> If anyone has any objections to moving "Successfully acquired lock!" to 
> LockManagerImpl, let me know.

Fine by me.

> 
> Cheers,
> -- 
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org








More information about the infinispan-dev mailing list