Ver código fonte

HDFS-14822. [SBN read] Revisit GlobalStateIdContext locking when getting server state id. Contributed by Chen Liang.

Chen Liang 5 anos atrás
pai
commit
4299bc0d3e

+ 3 - 1
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