Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 92029 invoked from network); 2 Nov 2010 09:44:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Nov 2010 09:44:25 -0000 Received: (qmail 72757 invoked by uid 500); 2 Nov 2010 09:44:56 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 72525 invoked by uid 500); 2 Nov 2010 09:44:53 -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 72518 invoked by uid 99); 2 Nov 2010 09:44:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Nov 2010 09:44:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Nov 2010 09:44:50 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oA29iSKV020587 for ; Tue, 2 Nov 2010 09:44:29 GMT Message-ID: <16326575.190691288691068853.JavaMail.jira@thor> Date: Tue, 2 Nov 2010 05:44:28 -0400 (EDT) From: "Kristian Waagan (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4849) Re-compilation may cause duplicate entries in the XPLAIN table In-Reply-To: <2187405.138091287042456312.JavaMail.jira@thor> 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 [ https://issues.apache.org/jira/browse/DERBY-4849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927343#action_12927343 ] Kristian Waagan commented on DERBY-4849: ---------------------------------------- Thanks for the feedback, Knut. As for the NO_WAIT + retry option, the statistics in this case are accessed in a nested transaction which could be rollback back. However, I found it hard to guarantee that the relevant methods will always be called in a nested transaction, as they are used in a few more places. For clarity, I was thinking of using this option for the case when we are reading the statistics, not when we are inserting/deleting entries. This was based on the assumption that almost all access to the system statistics table will be reads. I'll pursue the approach of modifying the data dictionary code to allow returning more than one row with isolation read uncommitted (this is of course allowed in the general case, but the data dictionary code seems to avoid it). It is not clear to me which issues we are exposed to, if any, by doing that. > Re-compilation may cause duplicate entries in the XPLAIN table > -------------------------------------------------------------- > > Key: DERBY-4849 > URL: https://issues.apache.org/jira/browse/DERBY-4849 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.6.2.1, 10.7.1.0 > Reporter: Kristian Waagan > Assignee: Kristian Waagan > Priority: Minor > Attachments: derby-4849-1a-narrow_fix.diff, derby-4849-2a-broad_fix.diff, derby-4849-2b-broad_fix_with_test.diff, derby-4849-2b-broad_fix_with_test.stat, derby-4849-2c-broad_fix_with_test.diff, derby-4849-xplain_duplicate_stacktrace.txt > > > If happening at the right moment, a re-compilation request may cause duplicate entries in the XPLAIN statement tables. > I have only confirmed this for the SYSXPLAIN_STATEMENTS table, and I do not know if the other XPLAIN tables are affected. > The error is highly intermittent, and so far I have only been able to trigger it when testing the automatic index statistics update prototype. > See the attached stack-trace for some more details. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.