Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E099340EF for ; Sat, 9 Jul 2011 20:58:21 +0000 (UTC) Received: (qmail 61682 invoked by uid 500); 9 Jul 2011 20:58:21 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 61653 invoked by uid 500); 9 Jul 2011 20:58:21 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 61645 invoked by uid 99); 9 Jul 2011 20:58:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2011 20:58:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2011 20:58:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D4E01411C5 for ; Sat, 9 Jul 2011 20:57:59 +0000 (UTC) Date: Sat, 9 Jul 2011 20:57:59 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Message-ID: <1263540777.268.1310245079868.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (AMQ-1309) [DefaultDatabaseLocker] Do not log full stack trace when lock cannot be obtained MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish closed AMQ-1309. ----------------------------- Resolution: Won't Fix Fix Version/s: (was: NEEDS_REVIEWED) AGING_TO_DIE OBE. 4.x is EOL > [DefaultDatabaseLocker] Do not log full stack trace when lock cannot be obtained > -------------------------------------------------------------------------------- > > Key: AMQ-1309 > URL: https://issues.apache.org/jira/browse/AMQ-1309 > Project: ActiveMQ > Issue Type: Improvement > Components: Message Store > Affects Versions: 4.1.0 > Reporter: Kenny MacLeod > Fix For: AGING_TO_DIE > > > 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. For more information on JIRA, see: http://www.atlassian.com/software/jira