[
https://issues.apache.org/jira/browse/OAK-11111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joerg Hoh closed OAK-11111.
---------------------------
> CachedPrincipalMembershipReader could return empty principal under concurrency
> ------------------------------------------------------------------------------
>
> Key: OAK-11111
> URL: https://issues.apache.org/jira/browse/OAK-11111
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Affects Versions: 1.68.0
> Reporter: Alejandro Moratinos
> Assignee: Alejandro Moratinos
> Priority: Major
> Fix For: 1.72.0
>
>
> CachedPrincipalMembershipReader can be configured to define a stale time
> during which an outdated principal list is returned while the cache is being
> refreshed.
> If a stale time is configured then there will be a period when the cache it's
> being updated by one request thread
> ([here|https://github.com/apache/jackrabbit-oak/blob/9ca692077b7a8c3f43f42895a4c3ba93d0614011/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/CachedPrincipalMembershipReader.java#L128-L131])
> and others request could serve an empty list of principals because the
> property that contains [the cached principal list is not written
> yet|https://github.com/apache/jackrabbit-oak/blob/9ca692077b7a8c3f43f42895a4c3ba93d0614011/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/CachedPrincipalMembershipReader.java#L180-L191].
> This can happens depending on the concurrency level and the time it takes
> to build the principal list from one thread.
> Also that could happen only if the property is not present which could only
> occur the first time the cache is being built as the property is not being
> deleted afterwards.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)