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 and stopping slave
Date Thu, 15 Nov 2007 12:20:43 GMT

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

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

This issue is meant to handle the aforementioned start/stop commands *after* the database
has been copied to the correct slave location. An issue for copying the database over the
master/slave network connection will be added later.

I played a bit with startSlave in the proof of concept code. Using a "two phase" login like
in encrypt database seems like a good plan since we need to authenticate and authorize users
starting the slave replication behavior (if these security measures are turned on). A quick
and dirty implementation of the plan below seems to work fine in the proof of concept code:

EmbedConnection#<init> 
if (isReplicationSlaveStart == true)
1) boot database with Property value REPLICATION_MODE=PRE_SLAVE_MODE set (property not in
codeline yet). This ensures that LogToFile does not write anything to the log files (very
important!! Functionality not in codeline yet)
2) authenticate user with the booted database. 
3) shut the database down
4) boot the database with Property value REPLICATION_MODE=SLAVE_MODE set (property already
in the codeline). This ensures that the slave replication functionality is booted, and that
the logging system does not leave LogToFile#recover() (functionality already in codeline)

> Replication: Add connection url command options for starting and stopping slave
> -------------------------------------------------------------------------------
>
>                 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ørgen Løland
>
> Add commands to start and stop the replication slave using properties or connection url.
Example:
> '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.


Mime
View raw message