[
https://issues.apache.org/jira/browse/DERBY-2921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530660
]
Knut Anders Hatlen commented on DERBY-2921:
-------------------------------------------
Shouldn't ReplicationMessage.readExternal() throw an exception if the version
is incorrect? As it is now, it checks the version and just leaves all fields as
null values if it is incorrect. I think the appropriate exception is
java.io.InvalidClassException (sub-class of IOException).
I'm not sure the version check in parseInitiatorMessage() works. If the version
is incorrect, ReplicationMessage.getMessage() will return null. That means this
line fails with a NullPointerException:
//Get the UID of the master
long masterVersion = ((Long)initiatorMessage.getMessage()).longValue();
So we never get to the point where we actually check the version.
By the way, do we need 8 bytes (a long) to represent the version, or would a
smaller data type suffice?
> Replication: Add a network service that connects the master and slave Derby
> instances
> -------------------------------------------------------------------------------------
>
> Key: DERBY-2921
> URL: https://issues.apache.org/jira/browse/DERBY-2921
> Project: Derby
> Issue Type: Sub-task
> Components: Services
> Affects Versions: 10.4.0.0
> Reporter: Jørgen Løland
> Assignee: V.Narayanan
> Attachments: Replication_Network_expln_v6.txt,
> Replication_Network_v1.diff, Replication_Network_v1.stat,
> Replication_Network_v10.diff, Replication_Network_v10.stat,
> Replication_Network_v2.diff, Replication_Network_v2.stat,
> Replication_Network_v3.diff, Replication_Network_v3.stat,
> Replication_Network_v4.diff, Replication_Network_v4.stat,
> Replication_Network_v5.diff, Replication_Network_v5.stat,
> Replication_Network_v6.diff, Replication_Network_v6.stat,
> Replication_Network_v7.diff, Replication_Network_v7.stat,
> Replication_Network_v8.diff, Replication_Network_v8.stat,
> Replication_Network_v9.diff, Replication_Network_v9.stat
>
>
> A network connection is required between the master and slave Derby instances
> of a replicated database. The connection will be used to send many kinds of
> messages, including:
> * log records
> * the database (when replication is started)
> * master -> slave commands (like "stop replication")
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.