It would be nice to have replication functionality to Derby; many potential Derby users seem to want this. The attached functional specification lists some initial thoughts for how this feature may work.
Dag Wanvik had a look at this functionality some months ago. He wrote a proof of concept patch that enables replication by copying (using file system copy) and redoing the existing Derby transaction log to the slave (unfortunately, I can not find the mail thread now).
DERBY-2852 contains a patch that enables replication by sending dedicated logical log records to the slave through a network connection and redoing these.
Replication has been requested and discussed previously in multiple threads, including these:
|Assignee||Jørgen Løland [ jorgenlo ]|
|Component/s||Replication [ 12312050 ]|
|Component/s||Miscellaneous [ 11400 ]|
[ I have a few comments/questions to the Functional Specification for Derby Replication - rev. 9.0.
Great to see a chapter 'Handling Failure Scenarios', but as stated here, there are numerous failure scenarios which can be encountered. As a follow-up, I would like to raise the following questions/comments:
1. Would be nice to also describe a scenario where the slave Derby instance crashes
2. Please confirm the following statement: 'Since the slave database is in recovery-mode, no data in the slave database can be changed at all by any means'. If this wouldn't be the case, a lot of consistency-problems and scenarios should be taken into account.
3. Is the relation Master-Slave really an N:M-relation and if so, are N and/or M somehow limited?
4. Master has still connection with Slave, but for some reason the Slave does not process the received logrecords: will this be seen as 'unexpected failure'?
5. Network issue: what to do in case of missing packages?
6. Network issue: will a multipath-configuration be supported? This will lead to a Slave receiving records in a wrong sequence
7. Network issue: multiple-network-interfaces: question as for 6). In addition: special scenario(s) if one such interface is dropped?
8. If 1 Master replicates to 2 different Slaves and one of these Slaves has a lower 'bandwidth' to receive/process the logs, will this one then determine the total (replication)transactional processes, thus also limit sending to the other Slave?
9. If Derby instance I1 contains database D1 as Master, database D2 as Slave, instance I2 contains the same but with opposite roles: isn't there a big risk for a 'dead' race in case of problems with main memory log buffer?
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Fixed [ 1 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Issue Type||New Feature [ 2 ]||Improvement [ 4 ]|
|Fix Version/s||10.4.1.3 [ 12313111 ]|
|Workflow||jira [ 12407061 ]||Default workflow, editable Closed status [ 12802294 ]|