[ https://issues.apache.org/jira/browse/HDDS-1974?focusedWorklogId=296630&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-296630 ]
ASF GitHub Bot logged work on HDDS-1974: ---------------------------------------- Author: ASF GitHub Bot Created on: 16/Aug/19 22:19 Start Date: 16/Aug/19 22:19 Worklog Time Spent: 10m Work Description: bharatviswa504 commented on pull request #1308: HDDS-1974. Implement OM CancelDelegationToken request to use Cache and DoubleBuffer. URL: https://github.com/apache/hadoop/pull/1308#discussion_r314908066 ########## File path: hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/security/OzoneDelegationTokenSecretManager.java ########## @@ -287,18 +287,40 @@ public OzoneTokenIdentifier cancelToken(Token<OzoneTokenIdentifier> token, throw new AccessControlException(canceller + " is not authorized to cancel the token " + formatTokenId(id)); } - try { - store.removeToken(id); - } catch (IOException e) { - LOG.error("Unable to remove token " + id.getSequenceNumber(), e); - } - TokenInfo info = currentTokens.remove(id); - if (info == null) { - throw new InvalidToken("Token not found " + formatTokenId(id)); + + // For HA ratis will take care of removal. + // This check will be removed, when HA/Non-HA code is merged. + if (!isRatisEnabled) { + try { + store.removeToken(id); + } catch (IOException e) { + LOG.error("Unable to remove token " + id.getSequenceNumber(), e); + } + TokenInfo info = currentTokens.remove(id); + if (info == null) { + throw new InvalidToken("Token not found " + formatTokenId(id)); + } + } else { + // Check whether token is there in-memory map of tokens or not on the + // OM leader. + TokenInfo info = currentTokens.get(id); Review comment: Yes, a complete map. ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 296630) Time Spent: 0.5h (was: 20m) > Implement OM CancelDelegationToken request to use Cache and DoubleBuffer > ------------------------------------------------------------------------ > > Key: HDDS-1974 > URL: https://issues.apache.org/jira/browse/HDDS-1974 > Project: Hadoop Distributed Data Store > Issue Type: Sub-task > Components: Ozone Manager > Reporter: Bharat Viswanadham > Assignee: Bharat Viswanadham > Priority: Major > Labels: pull-request-available > Time Spent: 0.5h > Remaining Estimate: 0h > > Implement OM CancelDelegationToken request to use OM Cache, double buffer. > -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org