[ 
https://issues.apache.org/jira/browse/DERBY-3551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581015#action_12581015
 ] 

V.Narayanan commented on DERBY-3551:
------------------------------------

I feel that the stored procedure will not be required.

Turning on logging with the present logic will happen when the master is booted 
(
connection url with startMaster=true)

Turning our attention to the future enhancements planned for 10.5 as mentioned
in the functional specification

----------------------------------------------------------------------------------------
How to start replication - Future enhancement (10.5)

When replication is started, the slave checks that the database does not 
already exist, 
and that the user is authorized to create a database. The slave then starts to 
listen for 
a master on the specified host and port. The master connects to the slave and 
performs a 
handshake to ensure that only one master connects to a slave. The master then 
sends the 
whole database, including the active log files, to the slave via this 
connection. Hence, 
the database is only booted, not created, on the slave.
------------------------------------------------------------------------------------------

The database copying operation happens when the master is connection to the 
slave. This is
also where we turn on logging for unlogged operations.

The stored procedure will then result in a series of redundant steps that would 
need to be
performed again when we do the shipping automatically in the future 
enhancements for 10.5.

That said,

I think we need to move the steps mentioned above, to when we start the master 
controller. But
I think this can wait till the above enhancements are implemented. 

For now the series of steps the user follows to start replication combined with 
the following 
check during replication startup

"Check if any unlogged operations are currently running, if yes unfreeze and 
throw an exception
saying that replication cannot be started since the database has unlogged 
operations running"

Should suffice.

> Implement procedure SYSCS_UTIL.SYSCS_PREPARE_REPLICATION()
> ----------------------------------------------------------
>
>                 Key: DERBY-3551
>                 URL: https://issues.apache.org/jira/browse/DERBY-3551
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Replication
>    Affects Versions: 10.4.0.0, 10.5.0.0
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>         Attachments: Derby3551_1.diff, Derby3551_1.stat
>
>
> Jorgen says-
> I suggest that the replication step in which the master database is frozen is 
> replaced by a new system procedure to solve index and import:
> Old: SYSCS_UTIL.SYSCS_FREEZE_DATABASE()
> New: SYSCS_UTIL.SYSCS_PREPARE_REPLICATION()
> The new system procedure should:
> 1) Freeze the database
> 2) Check if there are any ongoing transactions with unlogged operations. If 
> so - unfreeze and abort. Otherwise:
> 3) Enable logging of unlogged operations 

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

Reply via email to