db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jørgen Løland (JIRA) <j...@apache.org>
Subject [jira] Updated: (DERBY-2926) Replication: Add a log buffer for log records that should be shipped to the slave
Date Wed, 25 Jul 2007 07:29:31 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jørgen Løland updated DERBY-2926:
---------------------------------

    Attachment: bytebuffer_v1.stat
                bytebuffer_v1.diff

Attachment: bytebuffer_v1.*

The attachment contains a buffer implemented as 

LinkedList freeBuffers
LinkedList dirtyBuffers

where each buffer is a byte[]. The buffer works similar to LogAccessFile, and reuses some
code from that file. 

The patch includes an exception. The exception (LogBufferFullException) will only be used
internally in the replication code. When caught by the log shipping code (to be written),
the log shipper will have to decide what to do. Some examples: stop replication, stop replication
but store log on disk for later restart, increase the buffer size, try to flush the buffer
to see if that helps, and so on. The exception will never be thrown outside the replication
code.

I have two minor questions. 
* I have not seen many internal exceptions in Derby. Is it ok for me to add one? I think the
"LogBufferFullException" provides valuable information...
* I have placed the patch in java/engine/org/apache/derby/impl/services/replication/buffer/.
Future replication patches are intended to be added to the same path (- "buffer/"). Is that
ok?

The buffer is not used anywhere in the Derby code yet. Later replication patches will start
using it. I ran derbyall and suites.all. These failed with the same *number* of fail/errors
as reported by tinderbox. Unfortunately, the tinderbox report site is down for the moment.
Since the code is not used for now, I expect it to not be the cause of the failures.

> Replication: Add a log buffer for log records that should be shipped to the slave
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-2926
>                 URL: https://issues.apache.org/jira/browse/DERBY-2926
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Store
>    Affects Versions: 10.4.0.0
>            Reporter: Jørgen Løland
>            Assignee: Jørgen Løland
>         Attachments: bytebuffer_v1.diff, bytebuffer_v1.stat
>
>
> When a Derby instance has the master role for a database, log records are shipped to
the slave to keep it up to date. A buffer is needed because the log records should not be
shipped one at a time. Also, writing the log records to a buffer instead of sending them immediately
removes the network communication from the critical path for the transaction.

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