[
https://issues.apache.org/jira/browse/DERBY-3021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524029
]
Jørgen Løland commented on DERBY-3021:
--------------------------------------
When Derby takes the replication slave role for a database, it has to start
with an unmodified database image received from the master. Only log (i.e.
operations) generated at the master can be appended to the slave database as
long as it has this role.
Normally, when a database is booted, Derby goes through recovery (in the
LogFactory service). Recovery performs work that cannot be done when a database
is in the slave mode. As an example, recovery will undo operations from
transactions that are not logged as committed. Since first booting the database
and then initiate replication will not work for the slave mode, slave
functionality must be added to the work performed at database boot time.
As in DERBY-2977, the slave controller service will be implemented
incrementally in multiple steps:
1) Add basic code to Derby so that the slave controller can be booted as a
service when a "startslave" command is issued to NetworkServerControl
2-n) Incrementally add controller logic as replication patches are added to
Derby.
The current plan for step 1 is:
* Add a slave replication property that is checked for when RawStore is booted
* If RawStore finds the property during boot, it will boot the SlaveController
service and then start booting the LogFactory service in such a way that
LogFactory#recovery does not disrupt replication.
> Replication: Add a ReplicationSlave controller that will manage replication
> on the slave side
> ---------------------------------------------------------------------------------------------
>
> Key: DERBY-3021
> URL: https://issues.apache.org/jira/browse/DERBY-3021
> Project: Derby
> Issue Type: Sub-task
> Components: Services
> Affects Versions: 10.4.0.0
> Reporter: Jørgen Løland
> Assignee: Jørgen Løland
>
> The replication slave role includes many tasks:
> * set up a network connection with the master
> * receive chunks of log from the master, and parse these into individual log
> records
> * append log records to the local log file
> * make sure that the recovery process is not allowed to access the logfile we
> are currently writing to
> * etc
> This issue is for adding a controller that will start/stop/initiate all
> services needed for the replication slave role.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.