diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt index 5b76f72258..67a64ebcc4 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt @@ -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) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java index 9b42124914..6e75bbc22f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java @@ -683,6 +683,9 @@ public synchronized void acceptRecovery(RequestInfo reqInfo, throws IOException { checkFormatted(); checkRequest(reqInfo); + + abortCurSegment(); + long segmentTxId = segment.getStartTxId(); // TODO: right now, a recovery of a segment when the log is