db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Øystein Grøvlen (JIRA) <j...@apache.org>
Subject [jira] Resolved: (DERBY-2939) Log file is flushed every time a log buffer gets full
Date Wed, 26 Sep 2007 08:42:51 GMT

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

Øystein Grøvlen resolved DERBY-2939.
------------------------------------

    Resolution: Fixed
    Derby Info:   (was: [Patch Available])

Tests passed for me, too.  Committed patch derby-2939-3bugfix.diff as revision  579511.

> Log file is flushed every time a log buffer gets full
> -----------------------------------------------------
>
>                 Key: DERBY-2939
>                 URL: https://issues.apache.org/jira/browse/DERBY-2939
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.3.1.4, 10.4.0.0
>            Reporter: Jørgen Løland
>            Assignee: Jørgen Løland
>         Attachments: derby-2939-1.diff, derby-2939-1.stat, derby-2939-2.diff, derby-2939-2.stat,
derby-2939-3.diff, derby-2939-3bugfix.diff
>
>
> LogAccessFile consists of a number of log buffers: LinkedList<LogAccessFileBuffer>
freeBuffers and dirtyBuffers, and LogAccessFileBuffer currentBuffer.
> When a log record is written to log, writeLogRecord wrongly assumes that the log record
is too big to fit in any log buffer if there is not enough free space in the current log buffer.
The code:
> if (total_log_record_length <= currentBuffer.bytes_free) {
> <append log record to current buffer>
> ...
> } else {
> <log record too big to fit in any buffer>
> ...
> }
> should be modified to:
> if (total_log_record_length <= currentBuffer.bytes_free) {
> <append log record to current buffer>
> ...
> } else if (total_log_record_length <= currentBuffer.length) {
> <swap log buffer>
> <append log record to new current buffer>
> ...
> } else {
> <log record too big to fit in any buffer>
> ...
> }

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