Description

According to "Functional Specification for Derby Replication" Rev. 9.0:
"Failover": "... . The command is only accepted on the slave if the network conection with the master is down." so expecting failover to return valid Connection.
However, failover never finish.

V.Narayanan
added a comment - 16/Apr/08 12:03 Hi Ole, would it be possible for you to pls attach the reproducible using which the
test was run? Following the steps mentioned does not reproduce this bug.

I am running the test programmatically which means the timing will be different from when testing manually via ij.

Here is what I found by instrumenting the test some more:

A)
If I add a sleep between the startMaster and the stopMaster the failover will not hang:
.
.
startSlave
startMaster
sleep(10000L)
stopMaster
failOver
Gets SQLSTATE: XRE07, SQLERRMC: Could not perform operation because the database is not in replication master mode.
connect slave: [localhost:4527//export/home/tmp/os136789/testingInMyDerbySandbox/db_slave/wombat]
CONNECTED

Ole Solberg
added a comment - 16/Apr/08 12:16 I am running the test programmatically which means the timing will be different from when testing manually via ij.
Here is what I found by instrumenting the test some more:
A)
If I add a sleep between the startMaster and the stopMaster the failover will not hang:
.
.
startSlave
startMaster
sleep(10000L)
stopMaster
failOver
Gets SQLSTATE: XRE07, SQLERRMC: Could not perform operation because the database is not in replication master mode.
connect slave: [localhost:4527//export/home/tmp/os136789/testingInMyDerbySandbox/db_slave/wombat]
CONNECTED
B)
Without this sleep the hang occurs:
.
.
startSlave
startMaster
stopMaster
connect slave: SQLSTATE: 08004, SQLERRMC: Connection refused to database '/export/home/tmp/os136789/testingInMyDerbySandbox/db_slave/wombat' because it is in replication slave mode.'
sleep(10000L) // No effect.
connect slave: SQLSTATE: 08004, SQLERRMC: Connection refused to database '/export/home/tmp/os136789/testingInMyDerbySandbox/db_slave/wombat' because it is in replication slave mode.'
failOver
HANGS!
In case A): should not the failover ('connect failover=true') return a valid connection according to the spec.?