[ https://issues.apache.org/jira/browse/HDFS-5737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Nauroth updated HDFS-5737: -------------------------------- Hadoop Flags: Reviewed Thanks for the review, Haohui. I'll commit this in a moment. bq. Implement your own binary search so that (1) it supports finding in a sub list of the collection, and (2) it always returns the lowest element in the list. That way you can make finding the pivot more efficient, and you don't need to create sub lists in copyDefaultsIfNeeded. My understanding is that {{ArrayList#subList}} returns an alternative view over the same underlying array, just with a different offset and length to pin it within the requested range. This would mean that there is no cost incurred for copying the underlying data, just some extra math to deal with offset calculations, so perhaps the efficiency gain would be minor. Here is the code for {{ArrayList#subList}}: http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/ArrayList.java#876 Agreed on point 2 though that we'd need a custom binary search variant if we want to do that. {{Collections#binarySearch}} can't do it. > Replacing only the default ACL can fail to copy unspecified base entries from > the access ACL. > --------------------------------------------------------------------------------------------- > > Key: HDFS-5737 > URL: https://issues.apache.org/jira/browse/HDFS-5737 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode > Affects Versions: HDFS ACLs (HDFS-4685) > Reporter: Chris Nauroth > Assignee: Chris Nauroth > Attachments: HDFS-5737.1.patch > > > The final round of changes in HDFS-5673 switched to a search approach instead > of a scan approach for finding base access entries that need to be copied to > the default ACL. However, in the case of doing full replacement on the > default ACL, the list may not be sorted properly at this point in the code, > causing the searches to miss the access entries. -- This message was sent by Atlassian JIRA (v6.1.5#6160)