db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Øystein Grøvlen (JIRA) <j...@apache.org>
Subject [jira] Commented: (DERBY-2921) Replication: Add a network service that connects the master and slave Derby instances
Date Mon, 17 Sep 2007 13:38:56 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528060
] 

Øystein Grøvlen commented on DERBY-2921:
----------------------------------------

Patch is starting to look very good, Narayanan!  Most of my comments are minor nits:

1. The javadoc for public classes and methods should focus on how it
   is to be used, not on its implementation. Some of the javadoc for
   fields just says the obvious, instead of what it represents. (E.g.,
   "Stores an instance of the SlaveAddress class".  If you know Java,
   you know this.  No need to tell people that. Instead, you should
   tell that slaveAddress contains the address to the slave to
   replicate to.)

2. In javadoc, I think @throws needs to be repeated for each
   exception. 

3. ReplicationMessageTransmit#sendAndReceiveAck: If an error is
   returned, why not use ack.getMessage() to get the SQLState?

4. SlaveAddress: I suggest to drop 'Slave' from getSlaveHostAddress()
   and getSlavePortNumber() since that should be implicit from the
   name of the class.

5. ReplicationMessageReceive: It seems unecessary to have serverSocket
   as a member field when it is only used by one method.  I think it
   could be local to initConnection().

6. SocketConnection:  I think you should deal with Objects in this
   class and let the replication specific casting be done by the
   ReplicationMessage... classes.

7. SocketConnection#writeMessage: The previous version did reset
   before writing and flush after.  Have you decided that this is not
   necessary?

8. ReplicationMessage:

   a) I thought messages of type TYPE_LOG, would contain LogRecord
      objects, not byte arrays.

   b) Why not use Integer or Long instead of String for the UID part
      of TYPE_INITIATE?

   c) VERSION_MISMATCH does not seem to be used.

   d) If you are able to cast the UID to int, why not store it as an
      integer instead of as a long?



   


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


Mime
View raw message