diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GlobalStateIdContext.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GlobalStateIdContext.java index a8c7141f05b..0da8995cd4b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GlobalStateIdContext.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GlobalStateIdContext.java @@ -147,7 +147,9 @@ class GlobalStateIdContext implements AlignmentContext { @Override public long getLastSeenStateId() { - return namesystem.getFSImage().getCorrectLastAppliedOrWrittenTxId(); + // Should not need to call getCorrectLastAppliedOrWrittenTxId() + // see HDFS-14822. + return namesystem.getFSImage().getLastAppliedOrWrittenTxId(); } @Override