You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Alex Parvulescu <al...@gmail.com> on 2014/11/05 16:57:49 UTC

PermissionStoreImpl flush doesn't fully refresh it's root reference

Hi,

While playing around with patches on OAK-2192 and compaction in general I
ran into a Root refresh issue.

The idea behind this is during segment compaction new states are being
created, and I'm making sure Root#refresh is being called, but I still see
some errors here from having stale references to non existing segments.
I think the problem comes from the fact that the PermissionStoreImpl
doesn't refresh the root reference on the privilegeBitsProvider variable.
The stacktrace I have is here [0], link to the code mentioned code is here
[1].

I'd love to hear some thought on this!

best,
alex


[0] ...org.apache.jackrabbit.oak.plugins.segment.SegmentNotFoundException

   at
org.apache.jackrabbit.oak.security.authorization.permission.PermissionStoreImpl.flush(PermissionStoreImpl.java:75)

   at
org.apache.jackrabbit.oak.security.authorization.permission.CompiledPermissionImpl.refresh(CompiledPermissionImpl.java:134)

   at
org.apache.jackrabbit.oak.security.authorization.permission.PermissionProviderImpl.refresh(PermissionProviderImpl.java:79)

   at
org.apache.jackrabbit.oak.core.MutableRoot.refresh(MutableRoot.java:237)
[1]
https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/PermissionStoreImpl.java#L72

Re: PermissionStoreImpl flush doesn't fully refresh it's root reference

Posted by Angela Schreiber <an...@adobe.com>.
Hi Alex

As discussed yesterday, I think you are right. The PermissionStoreImpl
should always get a new instance upon refresh... that issues has been
introduced while addressing the jcr:all issue earlier this year.
I will fix it today.

Thanks for spotting!
Angela



On 05/11/14 20:13, "Alex Parvulescu" <al...@gmail.com> wrote:

>I've created OAK-2255 for followup.
>
>On Wed, Nov 5, 2014 at 4:57 PM, Alex Parvulescu
><al...@gmail.com>
>wrote:
>
>> Hi,
>>
>> While playing around with patches on OAK-2192 and compaction in general
>>I
>> ran into a Root refresh issue.
>>
>> The idea behind this is during segment compaction new states are being
>> created, and I'm making sure Root#refresh is being called, but I still
>>see
>> some errors here from having stale references to non existing segments.
>> I think the problem comes from the fact that the PermissionStoreImpl
>> doesn't refresh the root reference on the privilegeBitsProvider
>>variable.
>> The stacktrace I have is here [0], link to the code mentioned code is
>>here
>> [1].
>>
>> I'd love to hear some thought on this!
>>
>> best,
>> alex
>>
>>
>> [0] 
>>...org.apache.jackrabbit.oak.plugins.segment.SegmentNotFoundException
>>
>>    at
>> 
>>org.apache.jackrabbit.oak.security.authorization.permission.PermissionSto
>>reImpl.flush(PermissionStoreImpl.java:75)
>>
>>    at
>> 
>>org.apache.jackrabbit.oak.security.authorization.permission.CompiledPermi
>>ssionImpl.refresh(CompiledPermissionImpl.java:134)
>>
>>    at
>> 
>>org.apache.jackrabbit.oak.security.authorization.permission.PermissionPro
>>viderImpl.refresh(PermissionProviderImpl.java:79)
>>
>>    at
>> org.apache.jackrabbit.oak.core.MutableRoot.refresh(MutableRoot.java:237)
>> [1]
>> 
>>https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/jav
>>a/org/apache/jackrabbit/oak/security/authorization/permission/PermissionS
>>toreImpl.java#L72
>>
>>


Re: PermissionStoreImpl flush doesn't fully refresh it's root reference

Posted by Alex Parvulescu <al...@gmail.com>.
I've created OAK-2255 for followup.

On Wed, Nov 5, 2014 at 4:57 PM, Alex Parvulescu <al...@gmail.com>
wrote:

> Hi,
>
> While playing around with patches on OAK-2192 and compaction in general I
> ran into a Root refresh issue.
>
> The idea behind this is during segment compaction new states are being
> created, and I'm making sure Root#refresh is being called, but I still see
> some errors here from having stale references to non existing segments.
> I think the problem comes from the fact that the PermissionStoreImpl
> doesn't refresh the root reference on the privilegeBitsProvider variable.
> The stacktrace I have is here [0], link to the code mentioned code is here
> [1].
>
> I'd love to hear some thought on this!
>
> best,
> alex
>
>
> [0] ...org.apache.jackrabbit.oak.plugins.segment.SegmentNotFoundException
>
>    at
> org.apache.jackrabbit.oak.security.authorization.permission.PermissionStoreImpl.flush(PermissionStoreImpl.java:75)
>
>    at
> org.apache.jackrabbit.oak.security.authorization.permission.CompiledPermissionImpl.refresh(CompiledPermissionImpl.java:134)
>
>    at
> org.apache.jackrabbit.oak.security.authorization.permission.PermissionProviderImpl.refresh(PermissionProviderImpl.java:79)
>
>    at
> org.apache.jackrabbit.oak.core.MutableRoot.refresh(MutableRoot.java:237)
> [1]
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/PermissionStoreImpl.java#L72
>
>