Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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();
}
...
The code above should have a recoveryFile.sync() on the line with the comment.