Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2453B4D2B for ; Fri, 17 Jun 2011 04:00:47 +0000 (UTC) Received: (qmail 8802 invoked by uid 500); 17 Jun 2011 04:00:46 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 8693 invoked by uid 500); 17 Jun 2011 04:00:46 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 8685 invoked by uid 99); 17 Jun 2011 04:00:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2011 04:00:44 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [202.36.219.1] (HELO smtp.adi.co.nz) (202.36.219.1) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2011 04:00:38 +0000 Received: from Spooler by smtp.adi.co.nz (Mercury/32 v4.61) ID MO003BF7; 17 Jun 2011 16:00:37 +1200 Received: from spooler by smtp.adi.co.nz (Mercury/32 v4.61); 17 Jun 2011 16:00:00 +1200 Received: from BMasoni7 (10.10.100.139) by adi.co.nz (Mercury/32 v4.61) with ESMTP ID MG003BF6; 17 Jun 2011 15:59:39 +1200 From: "Brett Mason" To: "'Derby Discussion'" References: <4A6CDC394CC14B5B92AB8ED3D5695129@WINDOMAIN.adi.co.nz><9B9164891FE649378D27C0D59EF559B5@WINDOMAIN.adi.co.nz> In-Reply-To: Subject: RE: Disappearing service.properties file Date: Fri, 17 Jun 2011 15:59:40 +1200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcwlC0/DK2DENjWmQ4ydXTgtBGg/RAHlwLMA X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7600.16807 Thanks, Logged as DERBY-5283. Cheers, Brett. -----Original Message----- From: Dag H. Wanvik [mailto:dag.wanvik@oracle.com] Sent: Wednesday, 8 June 2011 00:05 To: Derby Discussion Subject: Re: Disappearing service.properties file "Brett Mason" writes: > It does seem that Cases 1 & 2 are fairly easy to reproduce by terminating > the Java process while it is updating service.properties. I've included some > sample code which will trigger the problem quite reliably when it is > terminated on the following environments: > > Windows 7 64-bit, Sun 32-bit JRE 1.6u20, Derby 10.6.1.0 > Windows 7 64-bit, Sun 32-bit JDK 1.6u25, Derby 10.8.1.2 > Debian Linux 5.0, 32-bit, Sun JRE 1.6u20, Derby 10.6.1.0 (running within > Virtual Box) > > Is this issue worth reporting as a bug? > > Are there other scenarios where the file might be updated as part of > "normal" database usage? Particularly for regular INSERT/UPDATE/DELETE > statements, but also maintenance procedures such as SYSCS_BACKUP_DATABASE, > SYSCS_CHECK_TABLE, SYSCS_COMPRESS_TABLE, SYSCS_UPDATE_STATISTICS. Please file a JIRA issue for this so we can discuss it in the community with a view to improving the way we handle these transactional propery settings. I don't think INSERT/UPDATE/DELETE are subject to this scenario, but backup/restore may be. As for statistics, I don't think so from my preliminary investigation, but I am not 100% sure yet. Dag > > Thanks, > Brett. > > > > import java.sql.*; > import org.apache.derby.jdbc.*; > > public class DerbyLogArchiveModeTest { > > public static void main(String[] args) { > final EmbeddedDataSource ds = new EmbeddedDataSource(); > ds.setDatabaseName("derbyTest"); > ds.setCreateDatabase("create"); > > try { > final Connection conn = ds.getConnection(); > > try { > final Statement stmt = conn.createStatement(); > > try { > while (true) { > stmt.execute("call > SYSCS_UTIL.SYSCS_DISABLE_LOG_ARCHIVE_MODE(1)"); > } > } finally { > stmt.close(); > } > } finally { > conn.close(); > } > } catch (SQLException e) { > e.printStackTrace(); > } > } > }