From dev-return-96775-archive-asf-public=cust-asf.ponee.io@sling.apache.org Fri May 10 16:21:02 2019 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 D1A6C18061A for ; Fri, 10 May 2019 18:21:01 +0200 (CEST) Received: (qmail 69369 invoked by uid 500); 10 May 2019 16:21: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 69344 invoked by uid 99); 10 May 2019 16:21: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; Fri, 10 May 2019 16:21:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7E8BBE2B4D for ; Fri, 10 May 2019 16:21:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 211A8256C1 for ; Fri, 10 May 2019 16:21:00 +0000 (UTC) Date: Fri, 10 May 2019 16:21:00 +0000 (UTC) From: "Vikas Saurabh (JIRA)" To: dev@sling.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SLING-8407) JobManagerImpl.findJobs should prevent traversal 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-8407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837424#comment-16837424 ] Vikas Saurabh commented on SLING-8407: -------------------------------------- [~marett], option traversal fail is a loose hint to pak to fail fast if the best available option is to traverse. It's akin to Index hints in usual parlance (well oak supports real index hint using option index tag... ) Going towards this new behavior using a configuration is already something that [~egli] proposed and [~tmueller] updated his patch accordingly. > JobManagerImpl.findJobs should prevent traversal > ------------------------------------------------ > > Key: SLING-8407 > URL: https://issues.apache.org/jira/browse/SLING-8407 > Project: Sling > Issue Type: Improvement > Components: Event > Reporter: Thomas Mueller > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > The method [JobManagerImpl.findJobs|https://github.com/apache/sling-org-apache-sling-event/blob/master/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java#L373] runs a JCR query to find all jobs for a topic. > It is possible that such a query is running while the repository isn't initialized yet, meaning while the index isn't available yet. What is happening in this case is that the query is traversing all nodes below that path, triggering a warning that the query doesn't use an index. It is sometimes happening when a health check is running before the repository is initialized (ReplicationQueueHealthCheck and DistributionQueueHealthCheck). > It doesn't make sense that the query traverses the nodes. It should use an index. If the index isn't available yet, it should fail. Therefore, the query should use "option(traversal fail)". That would result in an exception that can be caught. I will log a related issue to change the health checks to process this exception and return HEALTH_CHECK_ERROR for this case. -- This message was sent by Atlassian JIRA (v7.6.3#76005)