[
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_v2.diff
bytebuffer_v2.stat
Attaching patch v2, replacing previous patches.
Thanks for reviewing the patch, Knut. In v2 I have addressed most of your
comments:
Fixed: 1, 2, 3, 4, 5, 6, 7 (partially), 8, 9, 10, 13
Comments:
--------
7: I cannot think of a situation where an application running j2me would want
to run replication. However, I do not think it is a good idea to block this
possibility at this point just to save 3 methods. I have therefore not removed
these methods.
11: You are right that Arrays.copyOf would be simpler. As far as I can see,
however, these were introduced in Java 1.6 and can therefore not be used.
12: I think the exception will only be seen by the master replication module.
The exception can be moved to iapi later if this assumption does not hold.
14: One log record could have the size of two whole pages (do and undo
information for a whole page) + log record overhead. This could potentially be
much larger than the default LogBufferElement size. I would therefore prefer to
keep the code as it is.
Also fixed:
----------
* Synchronization on two different objects in ReplicationLogBuffer so that the
logger can append log records and the log consumer can read chunks of log at
the same time.
* ReplicationLogBuffer.switchDirtyBuffer is no longer synchronized since all
uses of it is already synchronized. Also, the method is modified to move the
currentDirtyBuffer to dirtyBuffers even if freeBuffers.size == 0
* Clearification of comments
> 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: Services
> Affects Versions: 10.4.0.0
> Reporter: Jørgen Løland
> Assignee: Jørgen Løland
> Fix For: 10.4.0.0
>
> Attachments: bytebuffer_v1-fixheader.diff,
> bytebuffer_v1-fixheader.stat, bytebuffer_v1.diff, bytebuffer_v1.stat,
> bytebuffer_v1a.diff, bytebuffer_v1a.stat, bytebuffer_v2.diff,
> bytebuffer_v2.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.