[
https://issues.apache.org/jira/browse/HDFS-16244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hui Fei resolved HDFS-16244.
----------------------------
Fix Version/s: 3.4.0
Resolution: Fixed
> 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
> Components: namenode
> Reporter: JiangHua Zhu
> Assignee: JiangHua Zhu
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.4.0
>
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> 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.
> You will get an exception message at this time, for example:
> java.lang.AssertionError: Should hold namesystem write lock
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]