[
https://issues.apache.org/jira/browse/HADOOP-12699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15090106#comment-15090106
]
Xiao Chen commented on HADOOP-12699:
------------------------------------
This can be reproduced by running the following codes in a loop (plus the
assert). I can reproduce it within a handful of runs usually.
{code}
EncryptedKeyVersion ekv1 = kpce.generateEncryptedKey("k6");
kpce.rollNewVersion("k6");
EncryptedKeyVersion ekv2 = kpce.generateEncryptedKey("k6");
{code}
This test is added in HADOOP-11071. From my understanding, the problem is from
the async thread(s) in {{ValueQueue}}. (Probably what [~andrew.wang] said in
[the comment in
HADOOP-11071|https://issues.apache.org/jira/browse/HADOOP-11071?focusedCommentId=14125826&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14125826]).
If I comment out the line {{submitRefillTask(keyName, keyQueue);}} in
{{ValueQueue#getAtMost}}, the looped run can easily pass 10k runs without
failing.
I'm unsure whether this should be considered as a test only issue, or a bug.
I'll have more readings first, and work on a solution.
> TestKMS#testKMSProvider intermittently fails during 'test rollover draining'
> ----------------------------------------------------------------------------
>
> Key: HADOOP-12699
> URL: https://issues.apache.org/jira/browse/HADOOP-12699
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Xiao Chen
> Assignee: Xiao Chen
>
> I've seen several failures of testKMSProvider, all failed in the following
> snippet:
> {code}
> // test rollover draining
> KeyProviderCryptoExtension kpce = KeyProviderCryptoExtension.
> createKeyProviderCryptoExtension(kp);
> .....
> EncryptedKeyVersion ekv1 = kpce.generateEncryptedKey("k6");
> kpce.rollNewVersion("k6");
> EncryptedKeyVersion ekv2 = kpce.generateEncryptedKey("k6");
> Assert.assertNotEquals(ekv1.getEncryptionKeyVersionName(),
> ekv2.getEncryptionKeyVersionName());
> {code}
> with error message
> {quote}Values should be different. Actual: k6@0{quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)