You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cl...@apache.org on 2019/09/18 23:48:18 UTC

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

This is an automated email from the ASF dual-hosted git repository.

cliang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 4ed0aef  HDFS-14822. [SBN read] Revisit GlobalStateIdContext locking when getting server state id. Contributed by Chen Liang.
4ed0aef is described below

commit 4ed0aefe9fd3c79546d39e10ec81a142fa7b80ac
Author: Chen Liang <cl...@apache.org>
AuthorDate: Wed Sep 18 16:47:46 2019 -0700

    HDFS-14822. [SBN read] Revisit GlobalStateIdContext locking when getting server state id. Contributed by Chen Liang.
---
 .../org/apache/hadoop/hdfs/server/namenode/GlobalStateIdContext.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 3986a09..7d61359 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
@@ -165,7 +165,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


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org