activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AMQ-5444) KahaDB bug that skips doing a sync on recoveryFile
Date Tue, 25 Nov 2014 23:51:13 GMT

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

Timothy Bish resolved AMQ-5444.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 5.11.0
         Assignee: Timothy Bish

Fixed so that the recovery file is actually sync'd when enabled.  

> KahaDB bug that skips doing a sync on recoveryFile
> --------------------------------------------------
>
>                 Key: AMQ-5444
>                 URL: https://issues.apache.org/jira/browse/AMQ-5444
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>            Reporter: Jesse Fugitt
>            Assignee: Timothy Bish
>             Fix For: 5.11.0
>
>
> There appears to be a bug in the KahaDB PageFile.java class when attempting to sync files
to disk.  If the "enableDiskSyncs" option is set to true, it looks like the code is intending
to sync the recoveryFile and the writeFile.  However, it accidentally syncs the writeFile
twice and fails to sync the recoveryFile.  In the method below, see the if statement towards
the bottom that checks the enableDiskSyncs boolean to see the problem:
> private void writeBatch() throws IOException {
> ...
>             if (enableDiskSyncs) {
>                 // Sync to make sure recovery buffer writes land on disk..
>                 if (enableRecoveryFile) {
>                     writeFile.sync(); // This should not be writeFile.sync!!!!!!
>                 }
>                 writeFile.sync();
>             }
> ...
> The code above should have a recoveryFile.sync() on the line with the comment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message