[
https://issues.apache.org/jira/browse/HDFS-17424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17835334#comment-17835334
]
ASF GitHub Bot commented on HDFS-17424:
---------------------------------------
ZanderXu commented on code in PR #6696:
URL: https://github.com/apache/hadoop/pull/6696#discussion_r1557344652
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/security/token/delegation/DelegationTokenSecretManager.java:
##########
@@ -401,7 +402,10 @@ protected void logExpireToken(final
DelegationTokenIdentifier dtId)
// closes the edit log files. Doing this inside the
// fsn lock will prevent being interrupted when stopping
// the secret manager.
- namesystem.readLockInterruptibly();
+ // TODO: delegation token is a very independent system, so
+ // it's proper to use an seperated r/w lock instead of fs lock
+ // for getting/renewing/expiring/canceling token or updating master key.
Review Comment:
`logUpdateMasterKey` and `logExpireDelegationToken` need to write edit log,
so HDFS-13112 add `hasReadLock` for these methods.
So I think this FSLock is needed before we understand why `rollEdits` is not
thread-safe as HDFS-13112 said.
> [FGL] DelegationTokenSecretManager supports fine-grained lock
> -------------------------------------------------------------
>
> Key: HDFS-17424
> URL: https://issues.apache.org/jira/browse/HDFS-17424
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: ZanderXu
> Assignee: Yuanbo Liu
> Priority: Major
> Labels: pull-request-available
>
> DelegationTokenSecretManager supports fine-grained lock
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]