You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "JiangHua Zhu (Jira)" <ji...@apache.org> on 2021/09/29 07:51:00 UTC

[jira] [Created] (HDFS-16244) Add the necessary write lock in Checkpointer#doCheckpoint()

JiangHua Zhu created HDFS-16244:
-----------------------------------

             Summary: Add the necessary write lock in Checkpointer#doCheckpoint()
                 Key: HDFS-16244
                 URL: https://issues.apache.org/jira/browse/HDFS-16244
             Project: Hadoop HDFS
          Issue Type: Bug
            Reporter: JiangHua Zhu


When BackupNode is enabled, Checkpointer#doCheckpoint() will start to work.
When the image file needs to be reloaded, there is a call link, for example:
FSImage#reloadFromImageFile()->FSNamesystem#clear()->FSDirectory#reset().
In FSDirectory#reset(), the write lock needs to be acquired in advance, for example:
   void reset() {
     writeLock();
     try {
     ......
     } finally {
       writeUnlock();
     }
   }
However, no write lock has been acquired before this.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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