From dev-return-102014-archive-asf-public=cust-asf.ponee.io@sling.apache.org Wed Jan 8 14:36:02 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 3B4A0180607 for ; Wed, 8 Jan 2020 15:36:02 +0100 (CET) Received: (qmail 93522 invoked by uid 500); 8 Jan 2020 14:36:01 -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 93502 invoked by uid 99); 8 Jan 2020 14:36:01 -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; Wed, 08 Jan 2020 14:36:01 +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 B1264E2C1A for ; Wed, 8 Jan 2020 14:36:00 +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 30FBB7803E8 for ; Wed, 8 Jan 2020 14:36:00 +0000 (UTC) Date: Wed, 8 Jan 2020 14:36:00 +0000 (UTC) From: "Robert Munteanu (Jira)" To: dev@sling.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SLING-8946) Non-deterministic shadowing of resource observation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SLING-8946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17010714#comment-17010714 ] Robert Munteanu commented on SLING-8946: ---------------------------------------- [~diru] - for the backport to the 1.5.x branch, I would first ask if you can't upgrade to the latest version instead, we rarely get maintenance branches. > 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.10 > > 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] [https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/master/src/main/java/org/apache/sling/resourceresolver/impl/observation/BasicObservationReporter.java#L102] > [2] [https://github.com/apache/sling-org-apache-sling-resourceresolver/blob/master/src/main/java/org/apache/sling/resourceresolver/impl/providers/ResourceProviderTracker.java#L358] -- This message was sent by Atlassian Jira (v8.3.4#803005)