From derby-user-return-13663-apmail-db-derby-user-archive=db.apache.org@db.apache.org Tue Jun 7 12:05:47 2011 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 B75496415 for ; Tue, 7 Jun 2011 12:05:47 +0000 (UTC) Received: (qmail 26079 invoked by uid 500); 7 Jun 2011 12:05:47 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 26032 invoked by uid 500); 7 Jun 2011 12:05:47 -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 26025 invoked by uid 99); 7 Jun 2011 12:05:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 12:05:47 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [148.87.113.121] (HELO rcsinet10.oracle.com) (148.87.113.121) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 12:05:39 +0000 Received: from rtcsinet21.oracle.com (rtcsinet21.oracle.com [66.248.204.29]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p57C5GqG002571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 Jun 2011 12:05:18 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by rtcsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p57C5Fnw015759 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 7 Jun 2011 12:05:16 GMT Received: from abhmt012.oracle.com (abhmt012.oracle.com [141.146.116.21]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p57C5A7r007594 for ; Tue, 7 Jun 2011 07:05:10 -0500 Received: from localhost (/10.175.16.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 07 Jun 2011 05:05:08 -0700 From: dag.wanvik@oracle.com (Dag H. Wanvik) To: "Derby Discussion" Subject: Re: Disappearing service.properties file References: <4A6CDC394CC14B5B92AB8ED3D5695129@WINDOMAIN.adi.co.nz> <9B9164891FE649378D27C0D59EF559B5@WINDOMAIN.adi.co.nz> Date: Tue, 07 Jun 2011 14:05:00 +0200 In-Reply-To: <9B9164891FE649378D27C0D59EF559B5@WINDOMAIN.adi.co.nz> (Brett Mason's message of "Tue, 31 May 2011 16:18:43 +1200") Message-ID: User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: rtcsinet21.oracle.com [66.248.204.29] X-CT-RefId: str=0001.0A090201.4DEE13FF.0014:SCFSTAT5015188,ss=1,fgs=0 "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(); > } > } > }