AMQ-5815 ensure async write latch is released on exception

This commit is contained in:
gtully 2016-08-12 16:44:23 +01:00
parent 51166dc7af
commit 330f0ce734
1 changed files with 39 additions and 38 deletions

View File

@ -1048,6 +1048,8 @@ public class PageFile {
this.checkpointLatch = null;
}
try {
// First land the writes in the recovery file
if (enableRecoveryFile) {
Checksum checksum = new Adler32();
@ -1086,7 +1088,6 @@ public class PageFile {
}
}
try {
for (PageWrite w : batch) {
writeFile.seek(toOffset(w.page.getPageId()));
writeFile.write(w.getDiskBound(), 0, pageSize);