activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Fugitt (JIRA)" <>
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
             Project: ActiveMQ
          Issue Type: Bug
          Components: Message Store
            Reporter: Jesse Fugitt

There appears to be a bug in the KahaDB 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!!!!!!

The code above should have a recoveryFile.sync() on the line with the comment.

This message was sent by Atlassian JIRA

View raw message