zhouyifan279 commented on a change in pull request #2210:
URL: https://github.com/apache/incubator-kyuubi/pull/2210#discussion_r841038659



##########
File path: 
kyuubi-server/src/main/scala/org/apache/kyuubi/credentials/HadoopCredentialsManager.scala
##########
@@ -239,7 +246,9 @@ class HadoopCredentialsManager private (name: String) 
extends AbstractService(na
         try {
           promise.trySuccess(updateCredentials(userRef))
 
-          scheduleRenewal(userRef, renewalInterval)
+          if (userCredentialsRefMap.containsKey(userRef.getAppUser)) {

Review comment:
       Sorry for late reply. But considering the following scenario, I think we 
should also check whether `userRef` in `userCredentialsRefMap` has been 
replaced by a new one .
   
   1. `userRef` was waiting for next renewal. 
   2. `userRef` expired and was removed from `userCredentialsRefMap`
   3.  A new `userRef` was created because of user visiting.
   4. Renewal of old `userRef` started again.
   
   If we do not check, both old and new `userRef` will renew periodically.
   
   @lightning-L Correct me if I missed any point.




-- 
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]

Reply via email to