Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 19606 invoked from network); 26 Feb 2010 18:49:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Feb 2010 18:49:51 -0000 Received: (qmail 4955 invoked by uid 500); 26 Feb 2010 18:49:51 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 4885 invoked by uid 500); 26 Feb 2010 18:49:51 -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 4878 invoked by uid 99); 26 Feb 2010 18:49:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Feb 2010 18:49:51 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Feb 2010 18:49:49 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DFFAE234C48C for ; Fri, 26 Feb 2010 10:49:27 -0800 (PST) Message-ID: <1724845382.560711267210167916.JavaMail.jira@brutus.apache.org> Date: Fri, 26 Feb 2010 18:49:27 +0000 (UTC) From: "Lily Wei (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4166) improvements to the mailjdbc test In-Reply-To: <1849191315.1239916694889.JavaMail.jira@brutus> 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-4166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lily Wei updated DERBY-4166: ---------------------------- Attachment: derby.log DERBY-4166-schemachange3.diff Hi: After take out select from Refresh thread, rearrange reading mail message then attachment from Browse thread, add sleep time for Refresh thread, Browse thread and Purge thread. With long sleep time for Purge thread, we no long has to delete row from REFRESH.INBOX using "delete from REFRESH.INBOX where (values {fn TIMESTAMPDIFF(SQL_TSI_DAY, date,CURRENT_TIMESTAMP)})>1" Hence, no deadlock issue introduce by mailjdbc test. I was able to run mailjdbc test for more than 11 hours now without any issues. I am attaching the patch for review. I believe the original intent for interrupt is for the potential deadlock issue. If we truly want to stress test the system for its scale rather than handle deadlock situation, I believe this fix should be okay. I am open for any further approach. I also attach derby.log just for reference. Thanks, Lily > improvements to the mailjdbc test > --------------------------------- > > Key: DERBY-4166 > URL: https://issues.apache.org/jira/browse/DERBY-4166 > Project: Derby > Issue Type: Improvement > Components: Test > Affects Versions: 10.6.0.0 > Reporter: Kathey Marsden > Priority: Minor > Attachments: DERBY-4166-databasesize.diff, Derby-4166-samedb.diff, DERBY-4166-schemachange.diff, DERBY-4166-schemachange2.diff, DERBY-4166-schemachange3.diff, DERBY-4166-schemachange3.diff, DERBY-4166-schemachange4.diff, Derby-4166.diff, derby.log > > > When recently working with the mailjdbc system test org.apache.derbyTesting.system.mailjdbc on DERBY-4152 I noticed some potential improvements that might be good for the test. We should probably hold off on these improvements however until the root cause of DERBY-4152 is established, however, so we don't muddy the waters with that issue by changing the test. > 1) DbTasks.moveToFolders may throw an IllegalArgumentException. > There is a line: message_id = Rn.nextInt(count - 1); > if count is 1 the argument to nextInt() might be 0 which is not allowed. I hit this once but lost the stack trace, but it is apparent that when there is only one row in the table this can occur. > > 2) Allow/implement multiple attachments per message and cleanup DbTasks.insertMail() logic. > - Remove the attach_id column from INBOX to allow multiple attachments. > -Make the attachment insert part of the message for loop in insertMail. > Use getGeneratedKeys() to get the id of the inserted message. > When attachments are inserted, insert (1-4) attachments and give them a corresponding attach_id from 1-4. > This will allow for removal of the select statements used to determine id and attach_id. I'll file another issue for these improvements if folks agree that they are sensible. > A detailed description of the current implementation of insertMail is described at https://issues.apache.org/jira/secure/attachment/12405685/insertMailSummary.txt > 3) DbTasks.databaseSize calculation is wrong. It doesn't match du -sk. The method does not recurse into subdirectories and includes the length() on directory files which is undefined accourding to the file.length() javadoc. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.