Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 70998 invoked from network); 13 Jul 2009 09:01:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jul 2009 09:01:24 -0000 Received: (qmail 61246 invoked by uid 500); 13 Jul 2009 09:01:33 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 61184 invoked by uid 500); 13 Jul 2009 09:01:32 -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 61176 invoked by uid 99); 13 Jul 2009 09:01:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2009 09:01:32 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=FS_REPLICA,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.98.43] (HELO brmea-mail-2.sun.com) (192.18.98.43) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2009 09:01:22 +0000 Received: from dm-uk-01.uk.sun.com ([129.156.101.115]) by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n6D910ec010544 for ; Mon, 13 Jul 2009 09:01:01 GMT Received: from barman.uk.sun.com (barman.UK.Sun.COM [129.156.132.12]) by dm-uk-01.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id n6D91023013121 for ; Mon, 13 Jul 2009 10:01:00 +0100 (BST) Received: from vpn-129-150-121-18.uk.sun.com ([129.150.121.18]) by barman.uk.sun.com with esmtp (Exim 4.42) id 1MQHXW-0004Z6-DQ for derby-user@db.apache.org; Mon, 13 Jul 2009 10:09:38 +0100 Message-ID: <4A5AF7CA.1010904@sun.com> Date: Mon, 13 Jul 2009 10:00:58 +0100 From: Alan Burlison User-Agent: Thunderbird 2.0.0.21 (X11/20090608) MIME-Version: 1.0 To: Derby Discussion Subject: Re: Derby replication seems to be mostly useless References: <4A522D68.50401@sun.com> <4A532B59.2010800@sun.com> <4A535E2B.2080903@sun.com> <4A54A71C.6050205@sun.com> <4A54C304.7010802@sun.com> <4A54D3C0.3070602@sun.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Dag H. Wanvik wrote: > I suspect that when you use the programmatic approach, the databases > are not shut down cleanly. If the servers are started from the command > line, I think the booted databases are shut down cleanly. > > Cf these lines in NotworkServerControlImpl.java: > : > // if the server is started from the command line, it should shutdown the > // databases it has booted. > private boolean shutdownDatabasesOnShutdown = false; > > This means that when the server is started via the API, each database > needs to be shut down individually to get a clean shutdown (with > checkpoint). Unfortunately I don't think that's workable in practice. Because Derby auto-starts databases on connection, there is no way of stopping clients opening the database again whilst the copy and child start is happening. There needs to be some way to ensure the database is locked and then to flush the log entries. Would a SYSCS_UTIL.SYSCS_FREEZE_DATABASE followed by a SYSCS_UTIL.SYSCS_CHECKPOINT_DATABASE do the trick? -- Alan Burlison --