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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]