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 "Alejandro Moratinos (Jira)" <ji...@apache.org> on 2025/04/02 11:46:00 UTC

[jira] [Commented] (OAK-9762) Implement org.apache.jackrabbit.oak.spi.security.authorization.principalbased.impl.AbstractTreePermission.canReadAll

    [ https://issues.apache.org/jira/browse/OAK-9762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17940338#comment-17940338 ] 

Alejandro Moratinos commented on OAK-9762:
------------------------------------------

Hi [~angela] 

I've done some changes and ran a small set of benchmark comparing to trunk. I used PrinicipalBasedReadTest (it's not a typo the test is called like that). 

All the benchmark runs were executed using the same command:
{code:java}
 java -Dwarmup=5 -Druntime=120 -jar target/oak-benchmarks-1.77-SNAPSHOT.jar benchmark --concurrency 1,3,5,10,20 Oak-Segment-Tar PrinicipalBasedReadTest{code}
*Branch test runs:*
{noformat}
Run #1
# PrinicipalBasedReadTest          C     min     10%     50%     90%     max     N       mean 
Import deep tree: 2911
All paths: 123545
Oak-Segment-Tar                    1      26      28      29      31     65    4125      29
Oak-Segment-Tar                    3      34      42      48      54     84    7518      48
Oak-Segment-Tar                    5      58      71      76      82    139    7850      76
Oak-Segment-Tar                   10      81     167     183     197    303    6582     182
Oak-Segment-Tar                   20     106     295     361     424    698    6672     360
 
Run #2
# PrinicipalBasedReadTest          C     min     10%     50%     90%     max     N       mean 
Import deep tree: 2953
All paths: 123545
Oak-Segment-Tar                    1      27      29      30      32     78    3938      30
Oak-Segment-Tar                    3      33      41      47      54     96    7560      48
Oak-Segment-Tar                    5      55      70      76      81    122    7936      76
Oak-Segment-Tar                   10      98     176     188     200    267    6393     188
Oak-Segment-Tar                   20     117     326     381     437    667    6300     380

Run #3
# PrinicipalBasedReadTest          C     min     10%     50%     90%     max     N       mean 
Import deep tree: 2848
All paths: 123545
Oak-Segment-Tar                    1      26      26      27      29     63    4312      28
Oak-Segment-Tar                    3      32      40      45      53    136    7820      46
Oak-Segment-Tar                    5      58      72      77      82    130    7794      77
Oak-Segment-Tar                   10     105     165     180     196    360    6651     181
Oak-Segment-Tar                   20     128     305     362     414    625    6652     361{noformat}
*Trunk test runs:*
{noformat}
Run #1
# PrinicipalBasedReadTest          C     min     10%     50%     90%     max     N       mean 
Import deep tree: 2794
All paths: 123545
Oak-Segment-Tar                    1      28      28      30      32     97    3994      30
Oak-Segment-Tar                    3      35      44      50      56    112    7223      50
Oak-Segment-Tar                    5      60      72      78      83    159    7683      78
Oak-Segment-Tar                   10      63     159     178     195    337    6749     178
Oak-Segment-Tar                   20     103     299     359     415    613    6703     358

Run #2
# PrinicipalBasedReadTest          C     min     10%     50%     90%     max     N       mean 
Import deep tree: 2905
All paths: 123545
Oak-Segment-Tar                    1      27      29      30      32     76    3985      30
Oak-Segment-Tar                    3      34      43      48      54     96    7457      48
Oak-Segment-Tar                    5      56      72      77      83    153    7744      77
Oak-Segment-Tar                   10      83     155     175     197    409    6807     176
Oak-Segment-Tar                   20     126     302     351     399    608    6852     351

Run #3
# PrinicipalBasedReadTest          C     min     10%     50%     90%     max     N       mean 
Import deep tree: 2917
All paths: 123545
Oak-Segment-Tar                    1      28      29      31      33    103    3815      31
Oak-Segment-Tar                    3      36      44      50      56    153    7189      50
Oak-Segment-Tar                    5      41      69      76      82    169    7912      76
Oak-Segment-Tar                   10     100     165     180     195    307    6667     180
Oak-Segment-Tar                   20     156     306     364     421    598    6608     364{noformat}
Comparing results I do not see any huge improvement that would worth the risk to implement these changes on the Principal permission evaluation. Please do check the changes I've shared in this draft PR [https://github.com/apache/jackrabbit-oak/pull/2207] 

> Implement org.apache.jackrabbit.oak.spi.security.authorization.principalbased.impl.AbstractTreePermission.canReadAll
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: OAK-9762
>                 URL: https://issues.apache.org/jira/browse/OAK-9762
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: authorization-principalbased
>            Reporter: Angela Schreiber
>            Assignee: Angela Schreiber
>            Priority: Major
>
> given that _oak-authorization-principalbased_ does not allow for deny entries, implementing {{TreePermission.canReadAll}} should be straight forward to implement.
> while this won't help with repeated item access with an absolute path, i would expect some performance improvements when it comes to traversal (see also OAK-9761)
> cc: [~joerghoh], [~rma61870@adobe.com]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)