[
https://issues.apache.org/jira/browse/HDFS-5737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13865903#comment-13865903
]
Haohui Mai commented on HDFS-5737:
----------------------------------
The patch looks good to me. +1. However, there are a couple efficiency issues
that can be addressed in separate jiras:
# 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}}.
# Since you know the pivot, you can insert the default entries at the pivot
position and sort that sub list. Alternatively you can separate the ACLs into
default entries and access entries, and concat them at the very end.
> 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)