db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "V.Narayanan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3064) Implement the LogShipper that will enable the shipping of Log records from the master to the slave
Date Wed, 26 Sep 2007 12:29:50 GMT

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

V.Narayanan commented on DERBY-3064:
------------------------------------

Thank you for the comments Oystein

>Maybe there is a need for the MasterController to provide a method to
>be called by the log shipping thread to inform it when errors occurs. 

This is a very good suggestion

I plan to do the following for this.

1) Introduce a method in MasterFactory called handleExceptions(Exception e)

2) The implementation of handleExceptions in the MasterController will then 
   run instanceof checks the exceptions obtained e.

3) AsynchronousLogShipper constructor will be modified to accept the MasterFactory
   implementation(Master Controller).

4) I will catch all exceptions in the LogShipper and call handleExceptions for
   all of them

5) For now in the handleExceptions class I propose to throw all the exceptions
   obtained in StandardExceptions with appropriate SQLStates. More specific
   handling of the exceptions thrown can be handled later

>1. I do not see the need for recording lastShippingTime. When a
>   forceFlush is made, I do not think you would want to delay the next
>   regular sending of log records since there will still be more log
>   to send after the forceFlush has sent one chunk. Rather, I think
>   you would want to notify the log shipping thread that it is time
>   for another send. Hence, I suggest that you drop testing for time,
>   and use wait() instead of sleep() so that it is possible to wake up
>   the thread while it is waiting. 

lastShippingTime can be very useful when you want to improve the LogShipper
to automatically adjust shipping interval.

lastShippingTime - current time will give the time interval at which the
forceFlush keeps getting called. This difference can then act as the next
shipping interval.

But this is an improvement and can wait until later.

I will remove it and use wait(long interval) as you say.

Thanks once again for your comments.

> Implement the LogShipper that will enable the shipping of Log records from the master
to the slave
> --------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3064
>                 URL: https://issues.apache.org/jira/browse/DERBY-3064
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>         Attachments: LogShipperImpl_v1.diff, LogShipperImpl_v1.stat, LogShipperImpl_v2.diff,
LogShipperImpl_v2.stat
>
>


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