You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by rp...@apache.org on 2025/04/16 07:09:01 UTC
(ignite-3) 01/01: IGNITE-25161 Improve exception logging during node start
This is an automated email from the ASF dual-hosted git repository.
rpuch pushed a commit to branch ignite-25161
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit 19a4cf65d0f2b03a93b9695f8df46bef1db2c51b
Author: Roman Puchkovskiy <ro...@gmail.com>
AuthorDate: Wed Apr 16 11:08:43 2025 +0400
IGNITE-25161 Improve exception logging during node start
---
.../src/main/java/org/apache/ignite/internal/app/IgniteImpl.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
index 6af0253bcf2..69bec6f6c84 100644
--- a/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
+++ b/modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java
@@ -1602,11 +1602,17 @@ public class IgniteImpl implements Ignite {
var igniteException = new IgniteException(extractCodeFrom(e), errMsg, e);
+ // We log the exception as soon as possible to minimize the probability that it gets lost due to something like an OOM later.
+ LOG.error(errMsg, igniteException);
+
ExecutorService lifecycleExecutor = stopExecutor();
try {
lifecycleManager.stopNode(new ComponentContext(lifecycleExecutor)).get();
- } catch (Exception ex) {
+ } catch (Throwable ex) {
+ // We add ex as a suppressed subexception, but we don't know how the caller will handle it, so we also log it ourselves.
+ LOG.error("Node stop failed after node start failure", ex);
+
igniteException.addSuppressed(ex);
} finally {
lifecycleExecutor.shutdownNow();