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-3189) Replication: Add connection url command options for starting and stopping master
Date Tue, 08 Jan 2008 09:14:34 GMT

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

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

Hi Narayanan, 

I had a look at the stopMaster patch. The patch generally looks good, but I have a comment:

In RawStore#stopReplicationMaster, you have 

MasterFactory masterFactory = (MasterFactory)
            Monitor.bootServiceModule(true, this, getMasterFactoryModule(),

This does not work because in calls to bootServiceModule, the properties object (fourth parameter)
can not be null (it results in NPE). However, instead of calling bootServiceModule, you should
use findServiceModule - if a MasterFactory cannot be found, master replication mode cannot
be running right? Also, findServiceModule does not take a properties object, thus solving
the above NPE :) I would also have added a try-catch around the Monitor.find... code, and
throw an exception like "Cannot stop master. The database is not in replication master mode"

Nit: I would add a newline below the new code in all classes so that there is an empty line
between each method.

> Replication: Add connection url command options for starting and stopping master
> --------------------------------------------------------------------------------
>                 Key: DERBY-3189
>                 URL: https://issues.apache.org/jira/browse/DERBY-3189
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions:
>            Reporter: Jørgen Løland
>            Assignee: V.Narayanan
>         Attachments: derby-3189-1a.diff, derby-3189-1a.stat, StopMaster_impl_3189_v1.diff,
> Add commands to start and stop the replication master using properties or connection
url. Example:
> 'jdbc:derby:<host><masterdb>;startMaster=true';
> 'jdbc:derby:<host><masterdb>;stopMaster=true';
> Connection url options that must be recognized:
> startMaster=true
> stopMaster=true
> slaveHost=<host> (required)
> slavePort=<port> (optional, defaults to 8001)
> 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