HDFS-3914. QJM: acceptRecovery should abort current segment. Contributed by Todd Lipcon.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-3077@1383148 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Todd Lipcon 2012-09-10 23:20:49 +00:00
parent 729ec86907
commit c5199cace6
2 changed files with 5 additions and 0 deletions

View File

@ -62,3 +62,5 @@ HDFS-3900. QJM: avoid validating log segments on log rolls (todd)
HDFS-3901. QJM: send 'heartbeat' messages to JNs even when they are out-of-sync (todd)
HDFS-3899. QJM: Add client-side metrics (todd)
HDFS-3914. QJM: acceptRecovery should abort current segment (todd)

View File

@ -683,6 +683,9 @@ class Journal implements Closeable {
throws IOException {
checkFormatted();
checkRequest(reqInfo);
abortCurSegment();
long segmentTxId = segment.getStartTxId();
// TODO: right now, a recovery of a segment when the log is