[JBoss JIRA] (WFLY-12924) MP FT fallback metric is incremented wrongly
by Ivan Straka (Jira)
[ https://issues.redhat.com/browse/WFLY-12924?page=com.atlassian.jira.plugi... ]
Ivan Straka updated WFLY-12924:
-------------------------------
Description:
When method annotated with @Fallback and @Retry fails, MP FT fallback counter metric (fallback.calls.total) is incremented by 2. Meaning if the method fails N times (due to @Retry) fallback is invoked and the metric is 2.
The issue is only in the metric. Fallback method is invoked only once as expected.
*Reproducer:*
https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
*CDI Bean:*
{code:java}
@Fallback(fallbackMethod = "isReadyFallback")
@Retry(maxRetries = MAX_RETRIES)
public boolean isReady() throws IOException {
service.simulateOpeningResources();
return ready.get();
}
public boolean isReadyFallback() {
return readyInMainenance.get();
}
@Counted(name = "simulation-count", absolute = true, displayName = "Simulation Count", description = "Number of simulateOpeningResources invocations", reusable = true)
public void simulateOpeningResources() throws IOException {
if (inMaintanance.get()) {
throw new IOException("In maintanance");
}
}
{code}
https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
*Smallrye issue*
https://github.com/smallrye/smallrye-fault-tolerance/issues/158
was:
When method annotated with @Fallback and @Retry fails, MP FT fallback counter metric (fallback.calls.total) is incremented by 2. Meaning if the method fails N times (due to @Retry) fallback is invoked and the metric is 2.
The issue is only in the metric. Fallback method is invoked only once as expected.
Reproducer:
https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
CDI Bean:
{code:java}
@Fallback(fallbackMethod = "isReadyFallback")
@Retry(maxRetries = MAX_RETRIES)
public boolean isReady() throws IOException {
service.simulateOpeningResources();
return ready.get();
}
public boolean isReadyFallback() {
return readyInMainenance.get();
}
@Counted(name = "simulation-count", absolute = true, displayName = "Simulation Count", description = "Number of simulateOpeningResources invocations", reusable = true)
public void simulateOpeningResources() throws IOException {
if (inMaintanance.get()) {
throw new IOException("In maintanance");
}
}
{code}
https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
> MP FT fallback metric is incremented wrongly
> --------------------------------------------
>
> Key: WFLY-12924
> URL: https://issues.redhat.com/browse/WFLY-12924
> Project: WildFly
> Issue Type: Bug
> Components: MP Fault Tolerance
> Affects Versions: 19.0.0.Beta1
> Reporter: Ivan Straka
> Assignee: Radoslav Husar
> Priority: Blocker
>
> When method annotated with @Fallback and @Retry fails, MP FT fallback counter metric (fallback.calls.total) is incremented by 2. Meaning if the method fails N times (due to @Retry) fallback is invoked and the metric is 2.
> The issue is only in the metric. Fallback method is invoked only once as expected.
> *Reproducer:*
> https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
> *CDI Bean:*
> {code:java}
> @Fallback(fallbackMethod = "isReadyFallback")
> @Retry(maxRetries = MAX_RETRIES)
> public boolean isReady() throws IOException {
> service.simulateOpeningResources();
> return ready.get();
> }
> public boolean isReadyFallback() {
> return readyInMainenance.get();
> }
> @Counted(name = "simulation-count", absolute = true, displayName = "Simulation Count", description = "Number of simulateOpeningResources invocations", reusable = true)
> public void simulateOpeningResources() throws IOException {
> if (inMaintanance.get()) {
> throw new IOException("In maintanance");
> }
> }
> {code}
> https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
> *Smallrye issue*
> https://github.com/smallrye/smallrye-fault-tolerance/issues/158
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (WFLY-12924) MP FT fallback metric is incremented wrongly
by Ivan Straka (Jira)
[ https://issues.redhat.com/browse/WFLY-12924?page=com.atlassian.jira.plugi... ]
Ivan Straka updated WFLY-12924:
-------------------------------
Description:
When method annotated with @Fallback and @Retry fails, MP FT fallback counter metric (fallback.calls.total) is incremented by 2. Meaning if the method fails N times (due to @Retry) fallback is invoked and the metric is 2.
The issue is only in the metric. Fallback method is invoked only once as expected.
Reproducer:
https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
CDI Bean:
{code:java}
@Fallback(fallbackMethod = "isReadyFallback")
@Retry(maxRetries = MAX_RETRIES)
public boolean isReady() throws IOException {
service.simulateOpeningResources();
return ready.get();
}
public boolean isReadyFallback() {
return readyInMainenance.get();
}
@Counted(name = "simulation-count", absolute = true, displayName = "Simulation Count", description = "Number of simulateOpeningResources invocations", reusable = true)
public void simulateOpeningResources() throws IOException {
if (inMaintanance.get()) {
throw new IOException("In maintanance");
}
}
{code}
https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
was:
When method annotated with @Fallback and @Retry fails, MP FT fallback counter metric (fallback.calls.total) is incremented by 2. Meaning if the method fails N times (due to @Retry) fallback is invoked and the metric is 2.
The issue is only in the metric. Fallback method is invoked only once as expected.
Reproducer:
https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
CDI Bean:
https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
> MP FT fallback metric is incremented wrongly
> --------------------------------------------
>
> Key: WFLY-12924
> URL: https://issues.redhat.com/browse/WFLY-12924
> Project: WildFly
> Issue Type: Bug
> Components: MP Fault Tolerance
> Affects Versions: 19.0.0.Beta1
> Reporter: Ivan Straka
> Assignee: Radoslav Husar
> Priority: Blocker
>
> When method annotated with @Fallback and @Retry fails, MP FT fallback counter metric (fallback.calls.total) is incremented by 2. Meaning if the method fails N times (due to @Retry) fallback is invoked and the metric is 2.
> The issue is only in the metric. Fallback method is invoked only once as expected.
> Reproducer:
> https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
> CDI Bean:
> {code:java}
> @Fallback(fallbackMethod = "isReadyFallback")
> @Retry(maxRetries = MAX_RETRIES)
> public boolean isReady() throws IOException {
> service.simulateOpeningResources();
> return ready.get();
> }
> public boolean isReadyFallback() {
> return readyInMainenance.get();
> }
> @Counted(name = "simulation-count", absolute = true, displayName = "Simulation Count", description = "Number of simulateOpeningResources invocations", reusable = true)
> public void simulateOpeningResources() throws IOException {
> if (inMaintanance.get()) {
> throw new IOException("In maintanance");
> }
> }
> {code}
> https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (WFLY-12924) MP FT fallback metric is incremented wrongly
by Ivan Straka (Jira)
[ https://issues.redhat.com/browse/WFLY-12924?page=com.atlassian.jira.plugi... ]
Ivan Straka updated WFLY-12924:
-------------------------------
Steps to Reproduce:
build WildFly
clone git@github.com:istraka/eap-microprofile-test-suite.git branch mp-ft-metrics-reproducer
run the Reproducers#fallbackCounter test:
{code:bash}
mvn clean verify -pl tooling-server-configuration,microprofile-health -Djboss.home=_path_to_wf_ -DfailIfNoTests=false -Dtest=Reproducers#fallbackCounter
{code}
was:
build WildFly
clone git@github.com:istraka/eap-microprofile-test-suite.git branch mp-ft-metrics-reproducer
run the test:
{code:bash}
mvn clean verify -pl tooling-server-configuration,microprofile-health -Djboss.home=_path_to_wf_ -DfailIfNoTests=false -Dtest=Reproducers#fallbackCounter
{code}
> MP FT fallback metric is incremented wrongly
> --------------------------------------------
>
> Key: WFLY-12924
> URL: https://issues.redhat.com/browse/WFLY-12924
> Project: WildFly
> Issue Type: Bug
> Components: MP Fault Tolerance
> Affects Versions: 19.0.0.Beta1
> Reporter: Ivan Straka
> Assignee: Radoslav Husar
> Priority: Blocker
>
> When method annotated with @Fallback and @Retry fails, MP FT fallback counter metric (fallback.calls.total) is incremented by 2. Meaning if the method fails N times (due to @Retry) fallback is invoked and the metric is 2.
> The issue is only in the metric. Fallback method is invoked only once as expected.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (WFLY-12924) MP FT fallback metric is incremented wrongly
by Ivan Straka (Jira)
[ https://issues.redhat.com/browse/WFLY-12924?page=com.atlassian.jira.plugi... ]
Ivan Straka updated WFLY-12924:
-------------------------------
Steps to Reproduce:
build WildFly
clone git@github.com:istraka/eap-microprofile-test-suite.git branch mp-ft-metrics-reproducer
run the test:
{code:bash}
mvn clean verify -pl tooling-server-configuration,microprofile-health -Djboss.home=_path_to_wf_ -DfailIfNoTests=false -Dtest=Reproducers#fallbackCounter
{code}
was:
build WildFly
clone git@github.com:istraka/eap-microprofile-test-suite.git branch mp-ft-metrics-reproducer
run the test: mvn clean verify -pl tooling-server-configuration,microprofile-health -Djboss.home=_path_to_wf_ -DfailIfNoTests=false -Dtest=Reproducers#fallbackCounter
> MP FT fallback metric is incremented wrongly
> --------------------------------------------
>
> Key: WFLY-12924
> URL: https://issues.redhat.com/browse/WFLY-12924
> Project: WildFly
> Issue Type: Bug
> Components: MP Fault Tolerance
> Affects Versions: 19.0.0.Beta1
> Reporter: Ivan Straka
> Assignee: Radoslav Husar
> Priority: Blocker
>
> When method annotated with @Fallback and @Retry fails, MP FT fallback counter metric (fallback.calls.total) is incremented by 2. Meaning if the method fails N times (due to @Retry) fallback is invoked and the metric is 2.
> The issue is only in the metric. Fallback method is invoked only once as expected.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (WFLY-12924) MP FT fallback metric is incremented wrongly
by Ivan Straka (Jira)
Ivan Straka created WFLY-12924:
----------------------------------
Summary: MP FT fallback metric is incremented wrongly
Key: WFLY-12924
URL: https://issues.redhat.com/browse/WFLY-12924
Project: WildFly
Issue Type: Bug
Components: MP Fault Tolerance
Affects Versions: 19.0.0.Beta1
Reporter: Ivan Straka
Assignee: Radoslav Husar
When method annotated with @Fallback and @Retry fails, MP FT fallback counter metric (fallback.calls.total) is incremented by 2. Meaning if the method fails N times (due to @Retry) fallback is invoked and the metric is 2.
The issue is only in the metric. Fallback method is invoked only once as expected.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months