[
https://issues.apache.org/jira/browse/DERBY-3064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529772
]
V.Narayanan commented on DERBY-3064:
------------------------------------
In keeping with the design diagrams introduced in Derby-2872 I have modified the
LogShipper design. Pls find below a basic description of the changes that will
be
introduced in this issue.
LogShipper Design
-----------------
As part of this work the following changes are required
The AsynchronousLogShipper that enables periodic and force flushing of the Log
Buffer
is needed.
The MasterController is modified to start up the LogShipping module
and to call a flush on the buffer when the LogBufferFullException is thrown.
AsynchronousLogShipper
----------------------
* Handles periodic shipping of log chunks from the log buffer to the
slave
* Allows for force flushing of the log Buffer by the MasterController
when the MasterController gets a LogBufferFullException from the
LogBuffer.
Design of the class
-------------------
Implements interfaces - Serviceable, LogShipper
Constructor
-----------
Accepts the ReplicationLogBuffer, shippingDaemon and the transmitInterval.
Subscribes to the ShippingDaemon.
Methods
-------
shipALogChunk
-------------
Checks to see if a log record chunk is available in the logBuffer for
transmission
If yes removes this log record chunk and transmits it to the slave.
updates the lastTransmitTime to reflect the current time at which the transmit
was done.
flushedInstance
---------------
LogShipper interface method.
Used to update the latest instance of the log record that has been flushed to
the disk.
This method will not have any implementation.
forceFlush
----------
Forces a chunk of the log record from the log buffer to be sent to the
slave, freeing space in the log buffer.
calls shipALogChunk to ship the log chunk from the buffer.
serviceASAP
-----------
Serviceable interface method. Returns false.
serviceImmediately
------------------
Serviceable interface method. Returns false.
performWork
-----------
Gets the current time and subtracts the lastTransmitTime from it to get the
time interval
between transmissions.
Checks to see if the time interval calculate above is greater than or equal to
the
transmitInterval. If yes calls shipALogChunk. If no the method returns without
doing anything.
Changes to the MasterController class
-------------------------------------
startMaster
-----------
The LogShipper is initialized here.
appendLogRecord
---------------
when a LogBufferFullException is thrown we call
AsynchronousLogShipper.forceFlush
> 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
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.