[
https://issues.apache.org/jira/browse/HDFS-17395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17819951#comment-17819951
]
ASF GitHub Bot commented on HDFS-17395:
---------------------------------------
ZanderXu opened a new pull request, #6579:
URL: https://github.com/apache/hadoop/pull/6579
NameNode supports dynamically change ErasureCodingPolicy, so these
ErasureCodingPolicies should be protected by one lock, the current
implementation uses the global lock.
ErasureCodingPolicy mainly involves directory tree and edits logs, such as:
- getErasureCodingPolicy(String src)
- setErasureCodingPolicy(String src, String ecPolicyName)
- addErasureCodingPolicies(ErasureCodingPolicy[] policies)
- disableErasureCodingPolicy(String ecPolicyName)
- enableErasureCodingPolicy(String ecPolicyName)
So we can use the FSLock to make these operations thread safe.
Another reason why we use the FSLock to protect ErasureCodingPolicy related
operations is that we use FSLock to make edit write operations thread safe.
> [FGL] Use FSLock to protect ErasureCodingPolicy related operations
> ------------------------------------------------------------------
>
> Key: HDFS-17395
> URL: https://issues.apache.org/jira/browse/HDFS-17395
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: ZanderXu
> Assignee: ZanderXu
> Priority: Major
>
> NameNode supports dynamically change ErasureCodingPolicy, so these
> ErasureCodingPolicies should be protected by one lock, the current
> implementation uses the global lock.
>
> ErasureCodingPolicy mainly involves directory tree and edits logs, such as:
> * getErasureCodingPolicy(String src)
> * setErasureCodingPolicy(String src, String ecPolicyName)
> * addErasureCodingPolicies(ErasureCodingPolicy[] policies)
> * disableErasureCodingPolicy(String ecPolicyName)
> * enableErasureCodingPolicy(String ecPolicyName)
> So we can use the FSLock to make these operations thread safe.
> Another reason why we use the FSLock to protect ErasureCodingPolicy related
> operations is that we use FSLock to make edit write operations thread safe.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]