activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AMQ-1309) [DefaultDatabaseLocker] Do not log full stack trace when lock cannot be obtained
Date Fri, 20 Nov 2009 19:25:52 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Bruce Snyder updated AMQ-1309:
------------------------------

    Fix Version/s:     (was: AGING_TO_DIE)
                   5.4.0

> [DefaultDatabaseLocker] Do not log full stack trace when lock cannot be obtained
> --------------------------------------------------------------------------------
>
>                 Key: AMQ-1309
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1309
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Message Store
>    Affects Versions: 4.1.0
>            Reporter: Kenny MacLeod
>             Fix For: 5.4.0
>
>
> In DefaultDatabaseLocker.start(), the locking mechanism uses a continuous retry to obtain
the lock.  When a given try fails (e.g. because of a lock timeout), then the full exception
stack trace is logged.  For long-running slave brokers, this results is large, noisy log files
full of stack traces, for a condition which is in fact non-exceptional.
> I suggest that this logging is reduced to log just the exception message:
> log.error("Failed to acquire lock: " + e.getMessage();
> Better yet, use Spring's SQLErrorCodeSQLExceptionTranslator to translate the "cannot
acquire lock" SQLException into a CannotAcquireLockException, and catch that explicitly in
DefaultDatabaseLocker.  Then you can just log a message saying "couldn't acquire lock, retrying".
 Any other exception type can log the full stack trace as before.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message