sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dirk Rudolph (Jira)" <>
Subject [jira] [Commented] (SLING-8946) Non-deterministic shadowing of resource observation
Date Tue, 25 Feb 2020 12:57:02 GMT


Dirk Rudolph commented on SLING-8946:

For now implementing SLING-9077 seems the easiest to progress on this for now. I tested the
benchmark provided by [~sonagupt] with varying numbers of ResourceProviders (100,200,400,800
and 1600) and compared the results of the test with and without my proposed changes for SLING-9077.
In neither of both cases the CPU time increases linear with the number of ResourceProviders
unfortunately. Though with SLING-9077 the runtime of adding 1600 ResourceProviders compared
to add only 100 ResourceProviders improves from *~80x* to *~5x* (based on median and assuming
linear growth)

[~sonagupt] can you test if you ITs complete when using the changes to
bundle in SLING-9077? 

I know this is not a proper solution (but maybe a sufficient one). For a proper solution I
think we would need to make the PathSet used for the exclude Paths mutable so that overlapping
ResourceProvider's can be added/removed as the RP actually appears/disappears. Now this sounds
easier as it is but especially in the BasicObservationReporter's constructor some optimisation
is applied when collecting the ObservationConfigurations. Also that would mean that the JcrResourceProvider
cannot register it's listeners on update() with the excludePaths set anymore (not implemented
anyway in Oak afaik).

[~cziegeler] can you remember why BasicObservationReporter l101 ff [1] is necessary? As far
as I can see the condition on the providerPath should be quite restrictive already, for example:
{quote}providerPath = /
 excludedPaths = [/libs/sling/Folder/s7publish.json.POST.servlet,/libs/sling/distribution/services/agents,...]

 info.paths = [/content,/var]
Can you give an example what this code was supposed to handle?

[1] []

> Non-deterministic shadowing of resource observation
> ---------------------------------------------------
>                 Key: SLING-8946
>                 URL:
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.5.34
>            Reporter: Dirk Rudolph
>            Assignee: Robert Munteanu
>            Priority: Critical
>             Fix For: Resource Resolver 1.6.18
>         Attachments:
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
> The BasicObservationReporter implements shadowing of events being propagated per ResourceProvider
instance [1]. Assuming we do have 2 ResourceProviders registered, where the one shadows the
other like this:
>  - RP A registered on /
>  - RP B registered on /path
> then currently the excludes given to the BasicObservationReporter are different depending
on either RP A or RP B gets registered first:
>  - RP A before RP B => excludes are empty
>  - RP B before RP A => excludes contain /path
> This is because only the newly registered RP gets its ProviderContext updated [2]
> Same applies if RP B is registered before RP A and gets unregistered. In that case the
ObservationReporter of RP A stays untouched.
> [1] []
>  [2] []

This message was sent by Atlassian Jira

View raw message