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] Updated: (DERBY-2977) Replication: Add a ReplicationMaster controller that will manage replication on the master side
Date Tue, 09 Oct 2007 06:35:50 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jørgen Løland updated DERBY-2977:
---------------------------------

    Attachment: repli_logbuffer_v2b.diff
                repli_logbuffer_v2b.stat

Thanks for the review, Øystein. I have attached a new patch, v2b, addressing all your comments
except 2:

1. Changed constructor of LogAccessFile to call LogToFile#initLogAccessFileReplication. I
cannot think of a better name than startReplicationMasterRole, but feel free to suggest one...
9. Do you mean LogToFile#start/stop? If so, startReplicationMasterRole uses this.masterFactory
because a parameter has the same name, which is not the case for stopReplicationMasterRole.

Not fixed:

2. To be honest, I don't like either of these strategies ;-) 

With the current strategy: 
next() returns true -> some info is available - could be a log file switch, could be a
log record
next() returns false -> done

This allows the loop:
while (next()) {
   if (scan.isFileSwitch()) 
      switchLogFile();
   else
      applyLog(scan.getData());
}

The suggested strategy:
next() returns true -> log available, maybe also a log file switch 
next() returns false -> no log available, but maybe a log file switch? 

I'm ok with the "true" scenario, but not the "false" scenario. I.e., I don't think it is ok
for ReplicationLogScan to have vital information (a log switch *must* be performed at the
same place on the slave and master) when it returns false. I did not change this in the attached
patch. Ideally, I would like to see a third strategy that was better than both these, but
cannot think of
one.

All tests pass cleanly.

> Replication: Add a ReplicationMaster controller that will manage replication on the master
side
> -----------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2977
>                 URL: https://issues.apache.org/jira/browse/DERBY-2977
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Services
>    Affects Versions: 10.4.0.0
>            Reporter: Jørgen Løland
>            Assignee: Jørgen Løland
>         Attachments: derby_2977_1.diff, derby_2977_1.stat, derby_2977_1b.diff, derby_2977_1b.stat,
derby_2977_1c.diff, derby_2977_1c.stat, repli_logbuffer_v2.diff, repli_logbuffer_v2.stat,
repli_logbuffer_v2b.diff, repli_logbuffer_v2b.stat
>
>
> The replication master role includes many tasks:
> * set up a network connection to the slave
> * sending the database to the slave before starting replication
> * make sure that log records are appended to the network buffer, and that the log is
later sent to the slave
> * etc
> This issue is for adding a controller that will start/stop/initiate all services needed
for the replication master role.

-- 
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