[
https://issues.apache.org/jira/browse/DERBY-3489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
V.Narayanan updated DERBY-3489:
-------------------------------
Attachment: Derby3489_1.stat
Derby3489_1.diff
*
java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageTransmit.java
The constructor has been modified to accept the SlaveAddress object instead of
a host name
and port number as was happening previously.
*
java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageReceive.java
* java/engine/org/apache/derby/loc/messages.xml
* java/shared/org/apache/derby/shared/common/reference/MessageId.java
Modified the constructor to accept a SlaveAddress object instead of a host name
and port number.
The constructor was printing the following message in the logs
"Replication slave database '{0}' listens for connections from master on
'{1}:{2}'."
But the slave does not listen to connections until initConnections is called.
So I removed this message
from the constructor. I also removed corresponding entries in SQLState.java and
messages.xml.
Removed the getHostName() and getPort() functions, these functions seemed
superfluous. They are
no longer used in the SlaveController, they are used in only once place in the
receiver when an
exception was being thrown.
* java/engine/org/apache/derby/impl/store/replication/slave/SlaveController.java
slavehost and slaveport are no longer used (SlaveAddress object is instead
used).
introduced two functions getHostName and getPortNumber here that return the
hostName
and portNumber from SlaveAddress. (I will remove this if it seems unnecessary)
*
java/engine/org/apache/derby/impl/store/replication/master/MasterController.java
slavehost and slaveport are no longer used (SlaveAddress object is instead
used).
introduced two functions getHostName and getPortNumber here that return the
hostName
and portNumber from SlaveAddress. (I will remove this if it seems unnecessary)
I ran the replication tests
[EMAIL PROTECTED]:~/work/workspaces/Derby3489/test$ java
junit.textui.TestRunner
org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationSuite
........
Time: 670.003
OK (8 tests)
I also ran a repro where I tried to connect to a default port number
[EMAIL PROTECTED]:~/work/workspaces/Derby3489/master$ java
org.apache.derby.tools.ij
ij version 10.5
ij> connect 'jdbc:derby://localhost:1527/replicationdb';
ij> connect
'jdbc:derby://localhost:1527/replicationdb;startMaster=true;slaveHost=localhost';
ERROR XRE04: DERBY SQL error: SQLCODE: -1, SQLSTATE: XRE04, SQLERRMC:
replicationdblocalhost4851XRE04
ij>
> Error message XRE04 does not include the right port number.
> -----------------------------------------------------------
>
> Key: DERBY-3489
> URL: https://issues.apache.org/jira/browse/DERBY-3489
> Project: Derby
> Issue Type: Bug
> Components: Replication
> Affects Versions: 10.4.0.0
> Reporter: Øystein Grøvlen
> Assignee: V.Narayanan
> Attachments: Derby3489_1.diff, Derby3489_1.stat
>
>
> If the master is not able to connect to the slave, the error messages does
> not include the right port number:
> ij> connect
> 'jdbc:derby:masterDB;user=oystein;password=pass;startMaster=true;slaveHost=localhost;slavePort=9901';
> ERROR XRE04: Could not establish a connection to the peer of the replicated
> database 'masterDB' on address 'localhost:-1'.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.