You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2018/03/15 15:34:00 UTC
[jira] [Commented] (OAK-7343) Improvements to
PermissionEntryProviderImpl
[ https://issues.apache.org/jira/browse/OAK-7343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16400578#comment-16400578 ]
angela commented on OAK-7343:
-----------------------------
[~stillalex], I pushed an initial patch to my fork at https://github.com/anchela/jackrabbit-oak/commit/b437624c495b910ad34497f5d468fd7de4f3fd11
The patch includes:
- refactoring of the caches: {{PermissionEntryProviderImpl}} will hold a single cache only, which will either be an empty-cache (no entries), one based on the former _pathEntryMap_ or the default cache based on the {{PermissionEntryCache}}
- while originally permission entries would only be eagerly read if the total number of access controlled paths is estimated to be lower than the given max-size, the init of the {{PermissionEntryProviderImpl}} will also eagerly read entries for all principals that have less then (currently) 10 access controlled paths. this reduces the load on the {{NodeStore}} for those principal names that have very few entries and will leave the lazy loading for those principals that have lots of entries.
- furthermore it adds an extension to {{PermissionStoreEditor}} to keep track of the number of access controlled paths for a given principal root for newly created princial roots.
- this allows to adjust {{PermissionStore#getNumEntries}} to determine if the number is really exact (based on the counter mentioned before) or if it is still a best-effort guess based on the children-count (with the given max-number specified, ignoring potential c-nodes in the subtrees). subsequently it will be possible to identify when all permission entries have been loaded even if they are loaded lazily from the {{NodeStore}}.
I will wait for your feedback before moving forward on this. Benchmarks results will be attached to OAK-7346
> Improvements to PermissionEntryProviderImpl
> -------------------------------------------
>
> Key: OAK-7343
> URL: https://issues.apache.org/jira/browse/OAK-7343
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core, security
> Reporter: angela
> Assignee: angela
> Priority: Major
> Labels: performance
>
> Container issue to track potential improvements to {{PermissionEntryProviderImpl}} based on discussions with [~stillalex].
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)