Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 23984 invoked from network); 28 Feb 2008 13:08:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Feb 2008 13:08:51 -0000 Received: (qmail 83080 invoked by uid 500); 28 Feb 2008 13:08:46 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 83051 invoked by uid 500); 28 Feb 2008 13:08:46 -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 82990 invoked by uid 99); 28 Feb 2008 13:08:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Feb 2008 05:08:45 -0800 X-ASF-Spam-Status: No, hits=-1998.8 required=10.0 tests=ALL_TRUSTED,FS_REPLICA 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; Thu, 28 Feb 2008 13:08:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2677E234C047 for ; Thu, 28 Feb 2008 05:07:55 -0800 (PST) Message-ID: <686592298.1204204075156.JavaMail.jira@brutus> Date: Thu, 28 Feb 2008 05:07:55 -0800 (PST) From: =?utf-8?Q?=C3=98ystein_Gr=C3=B8vlen_=28JIRA=29?= To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3205) Replication: Add connection url command options for starting, stopping slave and for failover In-Reply-To: <20606458.1195128343797.JavaMail.jira@brutus> 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 [ https://issues.apache.org/jira/browse/DERBY-3205?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1257= 3264#action_12573264 ]=20 =C3=98ystein Gr=C3=B8vlen commented on DERBY-3205: ---------------------------------------- I have look at the failover-slave-2a patch, and the EmbedConnection changes looks good. I have also tested that if I am not the database owner, I am not allowed to initiate failover. For the SlaveController changes, I do not quite understand the catching of SecurityException in stopReceiverThread. Is this something you get when you run with the security manager? Does this mean that this should ideally be put in a doPrivileged call? If it happens, I guess the thread will not be interrupted, but according to the comment this is OK since the thread will stop anyway. So why call interrupt in the first place? I tested a scenario where I started replication and directly killed the master without performing any database operations. When I performed failover on the slave, the statement never completed. The derby.log file showed that the recovery thread had got an error similar to what I reported in DERBY-3475 after it had detected that the master had died. This caused the boot thread to terminate, but my connection attempt was still hanging in the sleep call of SlaveDatabase#failover. It seems there is some more clean-up that is missing. > Replication: Add connection url command options for starting, stopping sl= ave and for failover > -------------------------------------------------------------------------= -------------------- > > Key: DERBY-3205 > URL: https://issues.apache.org/jira/browse/DERBY-3205 > Project: Derby > Issue Type: Sub-task > Components: JDBC > Affects Versions: 10.4.0.0 > Reporter: J=C3=B8rgen L=C3=B8land > Assignee: J=C3=B8rgen L=C3=B8land > Attachments: derby-3205_startslave_dontcommit.diff, derby-3205_st= artslave_dontcommit.stat, failover-slave-1a.diff, failover-slave-1a.stat, f= ailover-slave-2a.diff, failover-slave-2a.stat, failover_impl_3205_NotForCom= mit_v1.diff, failover_impl_3205_NotForCommit_v1.stat, failover_impl_3205_v1= .diff, failover_impl_3205_v1.stat, failover_impl_3205_v2.diff, failover_imp= l_3205_v2.stat, failover_impl_3205_v3.diff, failover_impl_3205_v3.stat, fai= lover_impl_3205_v4.diff, failover_impl_3205_v4.stat, Socket_Close_Fix_v1.di= ff, Socket_Close_Fix_v1.stat, startSlave_1a.diff, startSlave_1a.stat, start= Slave_1b.diff, startSlave_1b.stat, startSlave_1c.diff, startSlave_1d.diff, = StopSlave_impl_3205_NotForCommit_v1.diff, StopSlave_impl_3205_NotForCommit_= v1.stat, stopSlave_v1a.diff, stopSlave_v1a.stat, stopSlave_v1b.diff, stopSl= ave_v1b.stat, stopSlave_v1c.diff, stopSlave_v1c.stat > > > Add commands to start and stop the replication slave using properties or = connection url. Example: > 'jdbc:derby:;startSlave=3Dtrue'; > 'jdbc:derby:;stopSlave=3Dtrue'; > 'jdbc:derby:;failover=3Dtrue; > Connection url options that must be recognized: > startSlave=3Dtrue > stopSlave=3Dtrue > failover=3Dtrue > slaveHost=3D (optional, defaults to localhost) (only for startSlave= ) > slavePort=3D (optional, defaults to 8001) (only for startSlave) > See functional specification on Derby-2872 for further details. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.