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

V.Narayanan updated DERBY-3364:
-------------------------------

    Attachment: Derby3364_v2.stat
                Derby3364_v2.diff

Changes from v1 of the patch submitted
---------------------------------------

java/engine/org/apache/derby/impl/services/replication/net/ReplicationMessageTransmit.java

* The tearDown() method is already present

java/engine/org/apache/derby/impl/services/replication/master/MasterController.java

* I assumed that stopping the log shipper would also tearDown the network 
associated
  with it. But I guess it is OK to use the tearDown method that is part of the 
MasterController.
  Each call of logShipper.stopLogShipment(); in the submitted patch will be 
followed by
  a teardownNetwork call.

java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java

* stopLogShipment() will no longer call tearDown

-----------------------------------------------
I ran the repro in client/server and it seemed to work fine for me.

ij version 10.4
ij> connect 'jdbc:derby://localhost:1527/replicationdb';
ij> connect 
'jdbc:derby://localhost:1527/replicationdb;startMaster=true;slaveHost=localhost;slavePort=8001';

Stopped slave here

ij(CONNECTION1)>  connect 
'jdbc:derby://localhost:1527/replicationdb;failover=true';
ERROR XRE21: DERBY SQL error: SQLCODE: -1, SQLSTATE: XRE21, SQLERRMC: 
replicationdbXRE21
ij(CONNECTION1)>

> Replication failover implementation must be modified to fail at the master 
> after slave has been stopped
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3364
>                 URL: https://issues.apache.org/jira/browse/DERBY-3364
>             Project: Derby
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 10.4.0.0
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>         Attachments: Derby3364_v1.diff, Derby3364_v1.stat, Derby3364_v2.diff, 
> Derby3364_v2.stat
>
>
> Jorgen says...
> I tried to run the failover command on the master, which seems to work fine 
> as long as the master and slave are still connected. If the slave has been 
> stopped for some reason, however, failover hangs on 
> MasterController#startFailover here: 
> ack = transmitter.readMessage();

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