[ https://issues.apache.org/jira/browse/HDFS-12667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16225234#comment-16225234 ]
Hadoop QA commented on HDFS-12667: ---------------------------------- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 17m 12s{color} | {color:blue} Docker mode activated. {color} | || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 0s{color} | {color:green} The patch appears to include 1 new or modified test files. {color} | || || || || {color:brown} trunk Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 17m 41s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 13m 7s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 35s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 3s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 11m 33s{color} | {color:green} branch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 1m 27s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 51s{color} | {color:green} trunk passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 45s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 12m 10s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 12m 10s{color} | {color:green} the patch passed {color} | | {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange} 0m 36s{color} | {color:orange} hadoop-common-project/hadoop-common: The patch generated 14 new + 21 unchanged - 3 fixed = 35 total (was 24) {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 1m 1s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 9m 57s{color} | {color:green} patch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 1m 37s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 52s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:green}+1{color} | {color:green} unit {color} | {color:green} 8m 1s{color} | {color:green} hadoop-common in the patch passed. {color} | | {color:red}-1{color} | {color:red} asflicense {color} | {color:red} 0m 30s{color} | {color:red} The patch generated 3 ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 98m 41s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:5b98639 | | JIRA Issue | HDFS-12667 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12894215/HDFS-12667-001.patch | | Optional Tests | asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle | | uname | Linux 57c40806b509 3.13.0-123-generic #172-Ubuntu SMP Mon Jun 26 18:04:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | /testptch/patchprocess/precommit/personality/provided.sh | | git revision | trunk / 9711b78 | | maven | version: Apache Maven 3.3.9 | | Default Java | 1.8.0_131 | | findbugs | v3.1.0-RC1 | | checkstyle | https://builds.apache.org/job/PreCommit-HDFS-Build/21877/artifact/out/diff-checkstyle-hadoop-common-project_hadoop-common.txt | | Test Results | https://builds.apache.org/job/PreCommit-HDFS-Build/21877/testReport/ | | asflicense | https://builds.apache.org/job/PreCommit-HDFS-Build/21877/artifact/out/patch-asflicense-problems.txt | | modules | C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common | | Console output | https://builds.apache.org/job/PreCommit-HDFS-Build/21877/console | | Powered by | Apache Yetus 0.7.0-SNAPSHOT http://yetus.apache.org | This message was automatically generated. > KMSClientProvider#ValueQueue does synchronous fetch of edeks in background > async thread. > ---------------------------------------------------------------------------------------- > > Key: HDFS-12667 > URL: https://issues.apache.org/jira/browse/HDFS-12667 > Project: Hadoop HDFS > Issue Type: Bug > Components: encryption, kms > Affects Versions: 3.0.0-alpha4 > Reporter: Rushabh S Shah > Assignee: Rushabh S Shah > Attachments: HDFS-12667-001.patch > > > There are couple of issues in KMSClientProvider#ValueQueue. > 1. > {code:title=ValueQueue.java|borderStyle=solid} > private final LoadingCache<String, LinkedBlockingQueue<E>> keyQueues; > // Stripped rwlocks based on key name to synchronize the queue from > // the sync'ed rw-thread and the background async refill thread. > private final List<ReadWriteLock> lockArray = > new ArrayList<>(LOCK_ARRAY_SIZE); > {code} > It hashes the key name into 16 buckets. > In the code chunk below, > {code:title=ValueQueue.java|borderStyle=solid} > public List<E> getAtMost(String keyName, int num) throws IOException, > ExecutionException { > ... > ... > readLock(keyName); > E val = keyQueue.poll(); > readUnlock(keyName); > ... > } > private void submitRefillTask(final String keyName, > final Queue<E> keyQueue) throws InterruptedException { > ... > ... > writeLock(keyName); // It holds the write lock while the key is > being asynchronously fetched. So the read requests for all the keys that > hashes to this bucket will essentially be blocked. > try { > if (keyQueue.size() < threshold && !isCanceled()) { > refiller.fillQueueForKey(name, keyQueue, > cacheSize - keyQueue.size()); > } > ... > } finally { > writeUnlock(keyName); > } > } > } > {code} > According to above code chunk, if two keys (lets say key1 and key2) hashes to > the same bucket (between 1 and 16), then if key1 is asynchronously being > refetched then all the getKey for key2 will be blocked. > 2. Due to stripped rw locks, the asynchronous behavior of refill keys is now > synchronous to other handler threads. > I understand that locks were added so that we don't kick off multiple > asynchronous refilling thread for the same key. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org