From 70bafc32bc7fedc09a49c588de113d337d0af92b Mon Sep 17 00:00:00 2001 From: Dmitry Aleksandrov Date: Tue, 2 May 2023 10:44:59 +0300 Subject: [PATCH 1/2] Fix 6720 LRA Logging --- .../lra/coordinator/client/narayana/NarayanaClient.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lra/coordinator/client/narayana-client/src/main/java/io/helidon/lra/coordinator/client/narayana/NarayanaClient.java b/lra/coordinator/client/narayana-client/src/main/java/io/helidon/lra/coordinator/client/narayana/NarayanaClient.java index bcf62571685..06397cb0e8d 100644 --- a/lra/coordinator/client/narayana-client/src/main/java/io/helidon/lra/coordinator/client/narayana/NarayanaClient.java +++ b/lra/coordinator/client/narayana-client/src/main/java/io/helidon/lra/coordinator/client/narayana/NarayanaClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2022 Oracle and/or its affiliates. + * Copyright (c) 2021, 2023 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -145,6 +145,8 @@ public Single cancel(URI lraId, PropagatedHeaders headers) { logF("LRA cancelled - LRAID: {0}", lraId); return Single.empty(); case CLIENT_ERROR: + logF("Unexpected client error during LRA cancel - LRAID: {0}, Status: {1}", lraId, status.code()); + return Single.empty(); default: if (404 == status.code()) { LOGGER.warning("Cancel LRA - Coordinator can't find id - LRAID: " + lraId); From 0f5122ad749df749d8b322f35110434d0708c8b7 Mon Sep 17 00:00:00 2001 From: Dmitry Aleksandrov Date: Wed, 3 May 2023 11:41:51 +0300 Subject: [PATCH 2/2] Remove redundant check --- .../lra/coordinator/client/narayana/NarayanaClient.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lra/coordinator/client/narayana-client/src/main/java/io/helidon/lra/coordinator/client/narayana/NarayanaClient.java b/lra/coordinator/client/narayana-client/src/main/java/io/helidon/lra/coordinator/client/narayana/NarayanaClient.java index 06397cb0e8d..958a7373f7e 100644 --- a/lra/coordinator/client/narayana-client/src/main/java/io/helidon/lra/coordinator/client/narayana/NarayanaClient.java +++ b/lra/coordinator/client/narayana-client/src/main/java/io/helidon/lra/coordinator/client/narayana/NarayanaClient.java @@ -148,10 +148,6 @@ public Single cancel(URI lraId, PropagatedHeaders headers) { logF("Unexpected client error during LRA cancel - LRAID: {0}, Status: {1}", lraId, status.code()); return Single.empty(); default: - if (404 == status.code()) { - LOGGER.warning("Cancel LRA - Coordinator can't find id - LRAID: " + lraId); - return Single.empty(); - } return connectionError("Unable to cancel lra " + lraId, status.code()); } })