db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jørgen Løland (JIRA) <j...@apache.org>
Subject [jira] Commented: (DERBY-3205) Replication: Add connection url command options for starting, stopping slave and for failover
Date Tue, 29 Jan 2008 08:30:34 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563424#action_12563424

Jørgen Løland commented on DERBY-3205:

Hi Narayanan,

I had a look at the failover_impl_3205_v1 patch, which looks good for the most part. I have
some comments - most of which are nits:

1) Indentation in EmbedConnection around line 340 is strange - do you use tab length of four
spaces? From the diff file I would guess you have a tab space of 8...
2) Typo in javadoc of EmbedConnection#isReplicationFailover - "stopSlave" instead of "failover".
3) AccessFactory - I think the new method "failover" would be easier to find if it was placed
close to the other replication methods. Feel free to ignore...
4) There are two Attribute.java files. I'm not sure if both are in use, but previously replication
attributes have been added to both files. We either need some insight on which file can be
ignored or continue to add the attributes to both files.
5) RawStore.failover - Do you intend to write a follow-up patch with error handling for the
case that MasterFactory is not found by the Monitor?
6) The javadoc for failover in all the classes say StandardException is thrown on error, but
MasterController will always throw an exception. It would be easier to understand the code
if the javadoc described the reason for throwing an exception even if failover was successful.
7) I tried to run the failover command on the master, which seems to work fine as long as
the master and slave are still connected. If the slave has been stopped for some reason, however,
failover hangs on MasterController#startFailover here: 
ack = transmitter.readMessage();
I'm not sure if this patch is the right one to fix this bug...

> Replication: Add connection url command options for starting, stopping slave and for
> ---------------------------------------------------------------------------------------------
>                 Key: DERBY-3205
>                 URL: https://issues.apache.org/jira/browse/DERBY-3205
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions:
>            Reporter: Jørgen Løland
>            Assignee: V.Narayanan
>         Attachments: derby-3205_startslave_dontcommit.diff, derby-3205_startslave_dontcommit.stat,
failover_impl_3205_NotForCommit_v1.diff, failover_impl_3205_NotForCommit_v1.stat, failover_impl_3205_v1.diff,
failover_impl_3205_v1.stat, Socket_Close_Fix_v1.diff, Socket_Close_Fix_v1.stat, startSlave_1a.diff,
startSlave_1a.stat, startSlave_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, stopSlave_v1b.stat
> Add commands to start and stop the replication slave using properties or connection url.
> 'jdbc:derby:<host><dbname>;startSlave=true';
> 'jdbc:derby:<host><dbname>;stopSlave=true';
> 'jdbc:derby:<host><dbname>;failover=true;
> Connection url options that must be recognized:
> startSlave=true
> stopSlave=true
> failover=true
> slaveHost=<host> (optional, defaults to localhost) (only for startSlave)
> slavePort=<port> (optional, defaults to 8001) (only for startSlave)
> See functional specification on Derby-2872 for further details.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message