[
https://issues.apache.org/jira/browse/JCR-3345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396843#comment-13396843
]
Julian Reschke commented on JCR-3345:
-------------------------------------
Odd: tried to modify EntryCollector.collectEntries to refresh:
protected List<AccessControlEntry> collectEntries(NodeImpl node,
EntryFilter filter) throws RepositoryException {
LinkedList<AccessControlEntry> userAces = new
LinkedList<AccessControlEntry>();
LinkedList<AccessControlEntry> groupAces = new
LinkedList<AccessControlEntry>();
if (node == null) {
// repository level permissions
NodeImpl root = (NodeImpl) systemSession.getRootNode();
if (ACLProvider.isRepoAccessControlled(root)) {
NodeImpl aclNode = root.getNode(N_REPO_POLICY);
filterEntries(filter, new ACLTemplate(aclNode).getEntries(),
userAces, groupAces);
}
} else {
node.getSession().refresh(true); ///////////////////// TEST
filterEntries(filter, getEntries(node).getACEs(), userAces,
groupAces);
NodeId next = node.getParentId();
while (next != null) {
Entries entries = getEntries(next);
filterEntries(filter, entries.getACEs(), userAces, groupAces);
next = entries.getNextId();
}
}
List<AccessControlEntry> entries = new
ArrayList<AccessControlEntry>(userAces.size() + groupAces.size());
entries.addAll(userAces);
entries.addAll(groupAces);
return entries;
}
but this seems to cause a deadlock.
> ACL evaluation may return non-fresh results
> -------------------------------------------
>
> Key: JCR-3345
> URL: https://issues.apache.org/jira/browse/JCR-3345
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core, security
> Affects Versions: 2.6
> Reporter: Julian Reschke
> Attachments: JCR-3345.test.patch
>
>
> It appears that changes to access control entries are not always visible
> right away; in particular not to the session that caused them.
> EntryCollectorTest has recently been extended to run the existing set of
> tests under load as well, and occasionally we see tests failing because of
> ACEs not yet being returned.
> Increasing the load (see attached patch for the test) seems to make it easier
> to reproduce.
> The underlying reason might be that this involves multiple sessions to be in
> sync.
> Note that the cache in CachingEntryCollector doesn't seem to be the cause;
> disabling it by commenting out all write operations to the cache (making
> everything a cache miss) doesn't change the outcome.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira