mirror of https://github.com/apache/activemq.git
resolve issue with page file recovery replaying write buffer at wrong offest, also have schedualler flush writes on new store creation, issue visible with unclean shutdown - https://issues.apache.org/activemq/browse/AMQ-2935
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1004600 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
667f26a155
commit
c94b4075e9
|
@ -201,6 +201,7 @@ public class JobSchedulerStore extends ServiceSupport {
|
||||||
if (isStarted()) {
|
if (isStarted()) {
|
||||||
result.start();
|
result.start();
|
||||||
}
|
}
|
||||||
|
this.pageFile.flush();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -335,7 +335,7 @@ public class PageFile {
|
||||||
loadFreeList();
|
loadFreeList();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG.debug("Recovering page file...");
|
LOG.debug(toString() + ", Recovering page file...");
|
||||||
nextTxid.set(redoRecoveryUpdates());
|
nextTxid.set(redoRecoveryUpdates());
|
||||||
|
|
||||||
// Scan all to find the free pages.
|
// Scan all to find the free pages.
|
||||||
|
@ -1107,8 +1107,7 @@ public class PageFile {
|
||||||
|
|
||||||
// Re-apply all the writes in the recovery buffer.
|
// Re-apply all the writes in the recovery buffer.
|
||||||
for (Map.Entry<Long, byte[]> e : batch.entrySet()) {
|
for (Map.Entry<Long, byte[]> e : batch.entrySet()) {
|
||||||
writeFile.seek(e.getKey());
|
writeFile.seek(toOffset(e.getKey()));
|
||||||
e.getValue();
|
|
||||||
writeFile.write(e.getValue());
|
writeFile.write(e.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue