melissayou commented on code in PR #5067:
URL: https://github.com/apache/hadoop/pull/5067#discussion_r1008566388
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java:
##########
@@ -417,24 +408,18 @@ private void processTokenAddOrUpdate(byte[] data) throws
IOException {
if (numRead > -1) {
DelegationTokenInformation tokenInfo =
new DelegationTokenInformation(renewDate, password);
- synchronized (this) {
Review Comment:
It was introduced from https://github.com/apache/hadoop/pull/2047/files
I don't get the full context of that change but in
`AbstractDelegationTokenSecretManager.java`, they changed implementations of
`currentTokens` and `allKeys` from `hashmap` to `concurrentHashMap`(thread
safe). That's why they removed `synchronized` as it's a duplicate protection.
--
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]