sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bertrand Delacretaz (JIRA)" <>
Subject [jira] [Commented] (SLING-7069) CompositeHealthcheck combines subchecks with AND instead of OR
Date Tue, 22 Aug 2017 12:55:00 GMT


Bertrand Delacretaz commented on SLING-7069:

The {{CompositeHealthCheck}} calls {{healthCheckExecutor.execute(HealthCheckSelector.tags(filterTags))}}
which uses the default selection method of ANDing the tags, so this is by design.

SLING-3501 has the history of those and/or options, which didn't exist when {{CompositeHealthCheck}}
was created.

If we want to change this we need a new option for {{CompositeHealthCheck}} telling it to
use OR instead, and pass that to the executor.

> CompositeHealthcheck combines subchecks with AND instead of OR
> --------------------------------------------------------------
>                 Key: SLING-7069
>                 URL:
>             Project: Sling
>          Issue Type: Bug
>          Components: Health Check
>    Affects Versions: Health Check Core 1.2.8
>            Reporter: Jörg Hoh
> I have a CompositeHealthcheck like this
> {code}
> <jcr:root xmlns:sling="" xmlns:cq=""
xmlns:jcr="" xmlns:nt=""
>     jcr:primaryType="sling:OsgiConfig"
>"Health Checks (Runtime)"
>     filter.tags="[tag1,tag2,tag3]"
>     hc.tags="[runtime-monitoring]"
>     hc.async.cronExpression="50 0/1 * 1/1 * ? *"/>
> {code}
> whenever I run a healthcheck on the tag "runtime-monitoring" the healthchecks tagged
with "tag1", "tag2" and "tage3" should be executed.
> But whenever I run the healthceck on "runtime-monitoring", noone is executed at all.
> I tracked it down to the fact, that only these healthchecks are executed which have all
tags (tag1,tag2 and tag3) configured. Which of course none of my tags are.
> {code}
> 21.08.2017 17:06:00.502 *DEBUG* [HealthCheck Health Checks (Runtime)]
OSGi service filter in getTaggedHealthCheckServiceReferences(): (&(
> {code}
> It seems to me that instead of the AND it should be an OR:
> {code}
> (&(|(hc.tags=tag1)(hc.tags=tag2)(hc.tags=tag3)))
> {code}

This message was sent by Atlassian JIRA

View raw message