[ https://issues.apache.org/jira/browse/HDFS-17148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17752925#comment-17752925 ]
ASF GitHub Bot commented on HDFS-17148: --------------------------------------- hchaverri commented on code in PR #5936: URL: https://github.com/apache/hadoop/pull/5936#discussion_r1290725889 ########## hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/SQLDelegationTokenSecretManager.java: ########## @@ -458,8 +458,8 @@ public int incrementCurrentKeyId() { // Token operations in SQL database protected abstract byte[] selectTokenInfo(int sequenceNum, byte[] tokenIdentifier) throws SQLException; - protected abstract Map<byte[], byte[]> selectTokenInfos(long maxModifiedTime, int topResults) - throws SQLException; + protected abstract Map<byte[], byte[]> selectStaleTokenInfos(long maxModifiedTime, + int topResults) throws SQLException; Review Comment: Makes sense, I've renamed it > RBF: SQLDelegationTokenSecretManager must cleanup expired tokens in SQL > ----------------------------------------------------------------------- > > Key: HDFS-17148 > URL: https://issues.apache.org/jira/browse/HDFS-17148 > Project: Hadoop HDFS > Issue Type: Improvement > Components: rbf > Reporter: Hector Sandoval Chaverri > Priority: Major > Labels: pull-request-available > > The SQLDelegationTokenSecretManager fetches tokens from SQL and stores them > temporarily in a memory cache with a short TTL. The ExpiredTokenRemover in > AbstractDelegationTokenSecretManager runs periodically to cleanup any expired > tokens from the cache, but most tokens have been evicted automatically per > the TTL configuration. This leads to many expired tokens in the SQL database > that should be cleaned up. > The SQLDelegationTokenSecretManager should find expired tokens in SQL instead > of in the memory cache when running the periodic cleanup. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org