[
https://issues.apache.org/jira/browse/HADOOP-17208?focusedWorklogId=484281&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-484281
]
ASF GitHub Bot logged work on HADOOP-17208:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 15/Sep/20 03:37
Start Date: 15/Sep/20 03:37
Worklog Time Spent: 10m
Work Description: Hexiaoqiao commented on a change in pull request #2259:
URL: https://github.com/apache/hadoop/pull/2259#discussion_r488362922
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/ValueQueue.java
##########
@@ -299,19 +299,18 @@ public E getNext(String keyName)
* @param keyName the key to drain the Queue for
*/
public void drain(String keyName) {
+ Runnable e;
+ while ((e = queue.deleteByName(keyName)) != null) {
+ executor.remove(e);
+ }
+ writeLock(keyName);
try {
- Runnable e;
- while ((e = queue.deleteByName(keyName)) != null) {
- executor.remove(e);
- }
- writeLock(keyName);
- try {
- keyQueues.get(keyName).clear();
- } finally {
- writeUnlock(keyName);
+ LinkedBlockingQueue kq = keyQueues.getIfPresent(keyName);
+ if (kq != null) {
+ kq.clear();
}
- } catch (ExecutionException ex) {
Review comment:
Hi @xiaoyuyao , Not sure if it is compatible to throw out this
exception. Other are fair enough to me. Thanks.
----------------------------------------------------------------
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: 484281)
Time Spent: 2h (was: 1h 50m)
> LoadBalanceKMSClientProvider#deleteKey should invalidateCache via all
> KMSClientProvider instances
> -------------------------------------------------------------------------------------------------
>
> Key: HADOOP-17208
> URL: https://issues.apache.org/jira/browse/HADOOP-17208
> Project: Hadoop Common
> Issue Type: Improvement
> Affects Versions: 2.8.4
> Reporter: Xiaoyu Yao
> Assignee: Xiaoyu Yao
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h
> Remaining Estimate: 0h
>
> Without invalidateCache, the deleted key may still exists in the servers' key
> cache (CachingKeyProvider in KMSWebApp.java) where the delete key was not
> hit. Client may still be able to access encrypted files by specifying to
> connect to KMS instances with a cached version of the deleted key before the
> cache entry (10 min by default) expired.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]