Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-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 E85319F03 for ; Wed, 21 Sep 2011 18:53:33 +0000 (UTC) Received: (qmail 24537 invoked by uid 500); 21 Sep 2011 18:53:33 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 24430 invoked by uid 500); 21 Sep 2011 18:53:33 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 24400 invoked by uid 99); 21 Sep 2011 18:53:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2011 18:53:32 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,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; Wed, 21 Sep 2011 18:53:30 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 205CBA7B32 for ; Wed, 21 Sep 2011 18:53:09 +0000 (UTC) Date: Wed, 21 Sep 2011 18:53:09 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Message-ID: <463030415.51954.1316631189129.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (DERBY-5426) Improve the error raised by too much contention on a sequence/identity. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Improve the error raised by too much contention on a sequence/identity. ----------------------------------------------------------------------- Key: DERBY-5426 URL: https://issues.apache.org/jira/browse/DERBY-5426 Project: Derby Issue Type: Improvement Components: SQL Affects Versions: 10.8.2.1, 10.9.0.0 Reporter: Rick Hillegas Currently, when there is too much contention on a sequence/identity, Derby raises an error saying so. There are two properties which the user can adjust in order to reduce the risk of this error: derby.locks.waitTimeout derby.language.sequence.preallocator It would be good to point the user at these knobs. The following change would improve this error reporting: 1) Raise a lock timeout SQLException 2) Chain a "too much contention" SQLException (X0Y84) to the lock timeout. 3) Make the "too much contention" exception suggest that the user adjust the properties mentioned above. To make the code easier to understand, the exception raising could replace the loop exit inside the following "if" block in SequenceUpdater.getCurrentValueAndAdvance(): if ( (_lockTimeoutInMillis >= 0L) && ( (System.currentTimeMillis() - startTime.longValue()) > _lockTimeoutInMillis ) ) { break; } This approach was recommended by the discussion on DERBY-5423. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira