From dev-return-107770-archive-asf-public=cust-asf.ponee.io@sling.apache.org Thu Jun 25 13:40:04 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 49AD418066D for ; Thu, 25 Jun 2020 15:40:04 +0200 (CEST) Received: (qmail 43362 invoked by uid 500); 25 Jun 2020 13:40:03 -0000 Mailing-List: contact dev-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list dev@sling.apache.org Received: (qmail 43222 invoked by uid 99); 25 Jun 2020 13:40:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2020 13:40:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DD6964228B for ; Thu, 25 Jun 2020 13:40:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 5A641780C7D for ; Thu, 25 Jun 2020 13:40:00 +0000 (UTC) Date: Thu, 25 Jun 2020 13:40:00 +0000 (UTC) From: "Dirk Rudolph (Jira)" To: dev@sling.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (SLING-8946) Non-deterministic shadowing of resource observation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SLING-8946?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1714= 4920#comment-17144920 ]=20 Dirk Rudolph edited comment on SLING-8946 at 6/25/20, 1:39 PM: --------------------------------------------------------------- *TLDR* If SLING-9365 remains an optional opt-in we have to expect a higher = startup time of Sling Applications registering a arge amount of scripts/ser= vlets.=C2=A0However the project his issue was facing already change directi= on towards a different approach, getting rid of the custom ResourceProvider= implementation at all. So I'm also fine if we revert the changes and keep = this open. wdyt? As said before the functional defect addressed here, has been resolved. The= performance problems reported by [~sonagupt]=C2=A0are related to AEM which= apparently registers more than 1000 ResourceResolvers. The logic does not = scale well for that amount and as explained before the registered ResourceP= roviders are iterated with a polynomial time complexity. SLING-9040 address= ed one of those iterations and SLING-9077 was supposed to address another. = Still it would not resolve the problem when scaling to 10s of thousands of = ResourceProviders.=C2=A0SLING-9365 simply addresses this problem from a dif= ferent angle by not registering the (thousands of) ServletResourceProviders= in the first place.=C2=A0 Afaics the failing tests were simply caused by timeouts during the setup of= the integration tests. was (Author: diru): *TLDR* If SLING-9365 remains an optional opt-in we have to expect a higher = startup time of a Sling applications registering a arge amount of scripts/s= ervlets.=C2=A0However the project his issue was facing already change direc= tion towards a different approach, getting rid of the custom ResourceProvid= er implementation at all. So I'm also fine if we revert the changes and kee= p this open. wdyt? As said before the functional defect addressed here, has been resolved. The= performance problems reported by [~sonagupt]=C2=A0are related to AEM which= apparently registers more than 1000 ResourceResolvers. The logic does not = scale well for that amount and as explained before the registered ResourceP= roviders are iterated with a polynomial time complexity. SLING-9040 address= ed one of those iterations and SLING-9077 was supposed to address another. = Still it would not resolve the problem when scaling to 10s of thousands of = ResourceProviders.=C2=A0SLING-9365 simply addresses this problem from a dif= ferent angle by not registering the (thousands of) ServletResourceProviders= in the first place.=C2=A0 Afaics the failing tests were simply caused by timeouts during the setup of= the integration tests. > Non-deterministic shadowing of resource observation > --------------------------------------------------- > > Key: SLING-8946 > URL: https://issues.apache.org/jira/browse/SLING-8946 > 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: PerformanceScript.sh > > Time Spent: 1.5h > Remaining Estimate: 0h > > The BasicObservationReporter implements shadowing of events being propaga= ted per ResourceProvider instance [1]. Assuming we do have 2 ResourceProvid= ers 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 dif= ferent depending on either RP A or RP B gets registered first: > - RP A before RP B =3D> excludes are empty > - RP B before RP A =3D> excludes contain /path > This is because only the newly registered RP gets its ProviderContext upd= ated [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] [https://github.com/apache/sling-org-apache-sling-resourceresolver/bl= ob/master/src/main/java/org/apache/sling/resourceresolver/impl/observation/= BasicObservationReporter.java#L102] > [2] [https://github.com/apache/sling-org-apache-sling-resourceresolver/b= lob/master/src/main/java/org/apache/sling/resourceresolver/impl/providers/R= esourceProviderTracker.java#L358] -- This message was sent by Atlassian Jira (v8.3.4#803005)