Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 47948 invoked from network); 26 Sep 2007 12:30:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Sep 2007 12:30:14 -0000 Received: (qmail 74546 invoked by uid 500); 26 Sep 2007 12:30:04 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 74514 invoked by uid 500); 26 Sep 2007 12:30:04 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 74505 invoked by uid 99); 26 Sep 2007 12:30:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2007 05:30:04 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2007 12:32:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A2CAF714168 for ; Wed, 26 Sep 2007 05:29:50 -0700 (PDT) Message-ID: <26160147.1190809790654.JavaMail.jira@brutus> Date: Wed, 26 Sep 2007 05:29:50 -0700 (PDT) From: "V.Narayanan (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3064) Implement the LogShipper that will enable the shipping of Log records from the master to the slave In-Reply-To: <13994899.1189420769956.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.