Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 66522 invoked from network); 10 Jan 2006 09:41:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Jan 2006 09:41:43 -0000 Received: (qmail 97035 invoked by uid 500); 10 Jan 2006 09:41:42 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 97004 invoked by uid 500); 10 Jan 2006 09:41:42 -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 96995 invoked by uid 99); 10 Jan 2006 09:41:42 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2006 01:41:42 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 3E6AE1B7 for ; Tue, 10 Jan 2006 10:41:21 +0100 (CET) Message-ID: <682099389.1136886081253.JavaMail.jira@ajax.apache.org> Date: Tue, 10 Jan 2006 10:41:21 +0100 (CET) From: =?UTF-8?Q?=C3=98ystein_Gr=C3=B8vlen_=28JIRA=29?= To: derby-dev@db.apache.org Subject: [jira] Resolved: (DERBY-298) rollforward will not work correctly if the system happens to crash immediately after rollforward backup. In-Reply-To: <1739641137.1116444775718.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-298?page=3Dall ] =20 =C3=98ystein Gr=C3=B8vlen resolved DERBY-298: ----------------------------------- Fix Version: 10.2.0.0 10.1.3.0 Resolution: Fixed Verified that the added test run without failure. > rollforward will not work correctly if the system happens to crash immed= iately after rollforward backup. > -------------------------------------------------------------------------= -------------------------------- > > Key: DERBY-298 > URL: http://issues.apache.org/jira/browse/DERBY-298 > Project: Derby > Type: Bug > Components: Store > Versions: 10.0.2.1 > Reporter: Suresh Thalamati > Assignee: =C3=98ystein Gr=C3=B8vlen > Priority: Minor > Fix For: 10.1.3.0, 10.2.0.0 > Attachments: derby-298.diff, derby-298a.diff, derby-298b.diff > > If the system crashes after a rollforward backup; last log file=20 > is empty(say log2.dat). On next crash-recovery system ignores the empty = log=20 > file and starts writing to the previous log(say log1.dat), =20 > even thought there was successfule log file switch before the crash. > The reason I belive it is done this way to avoid special=20 > handling of crashes during the log switch process.=20 > Problem is on rollfroward restore from a backup log1.dat will get overwr= itten=20 > from the copy in the backup, so any transaction that got added to log1.da= t > after the backup was taken will be lost.=20 > =20 > One possible solution that comes to my mind to solve this problem is=20 > 1) check if an empty a log file exist after a redo crash-recovery , if= =20 > the log archive mode is enabled. > 2) If it exists , delete and do log file switch again=20 > =20 > Repro: > connect 'jdbc:derby:wombat;create=3Dtrue'; > create table t1(a int ) ; > insert into t1 values(1) ; > insert into t1 values(2) ; > call SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE( > 'extinout/mybackup', 0); > --crash (NO LOG RECORDS WENT IN AFTER THE BACKUP). > connect 'jdbc:derby:wombat'; > insert into t1 select a*2 from t1 ; > insert into t1 select a*2 from t1 ; > insert into t1 select a*2 from t1 ; > insert into t1 select a*2 from t1 ; > insert into t1 select a*2 from t1 ; > insert into t1 select a*2 from t1 ; > insert into t1 select a*2 from t1 ; > select count(*) from t1 ; > --exit from jvm and restore from backup > connect > 'jdbc:derby:wombat;rollForwardRecoveryFrom=3Dextinout/mybackup/wombat'; > select count(*) from t1 ; -- THIS WILL GIVE INCORRECT VALUES --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira