[ 
https://issues.apache.org/jira/browse/HDDS-1245?focusedWorklogId=211329&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-211329
 ]

ASF GitHub Bot logged work on HDDS-1245:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Mar/19 21:54
            Start Date: 11/Mar/19 21:54
    Worklog Time Spent: 10m 
      Work Description: ajayydv commented on pull request #587: HDDS-1245. OM 
delegation expiration time should use Time.now instead …
URL: https://github.com/apache/hadoop/pull/587#discussion_r264315721
 
 

 ##########
 File path: 
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/security/OzoneDelegationTokenSecretManager.java
 ##########
 @@ -158,12 +158,12 @@ private void addToTokenStore(OzoneTokenIdentifier 
identifier, byte[] password)
    */
   private void updateIdentifierDetails(OzoneTokenIdentifier identifier) {
     int sequenceNum;
-    long now = Time.monotonicNow();
+    long now = Time.now();
     sequenceNum = incrementDelegationTokenSeqNum();
     identifier.setIssueDate(now);
     identifier.setMasterKeyId(getCurrentKey().getKeyId());
     identifier.setSequenceNumber(sequenceNum);
-    identifier.setMaxDate(Time.monotonicNow() + getTokenMaxLifetime());
+    identifier.setMaxDate(Time.now() + getTokenMaxLifetime());
 
 Review comment:
   shall we use already initialized now variable here?
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 211329)
    Time Spent: 0.5h  (was: 20m)

> OM delegation expiration time should use Time.now instead of Time.monotonicNow
> ------------------------------------------------------------------------------
>
>                 Key: HDDS-1245
>                 URL: https://issues.apache.org/jira/browse/HDDS-1245
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Otherwise, we will set incorrect the exp date of OM delegation like below: 
> {code}
> ozone dtutil print /tmp/om.dt
>  
> File: /tmp/om.dt
> Token kind               Service              Renewer         Exp date     
> URL enc token
> --------------------------------------------------------------------------------
> OzoneToken               om:9862              yarn            *1/8/70 12:03 
> PM*
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to