activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Fugitt (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-5444) KahaDB bug that skips doing a sync on recoveryFile
Date Tue, 18 Nov 2014 23:14:34 GMT
Jesse Fugitt created AMQ-5444:
---------------------------------

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


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