You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by am...@apache.org on 2022/01/10 15:00:46 UTC
[ignite] 01/01: Drop down log level from error to warn for some user operation failures.
This is an automated email from the ASF dual-hosted git repository.
amashenkov pushed a commit to branch ignite-16249
in repository https://gitbox.apache.org/repos/asf/ignite.git
commit 55a6260ce68bbe94bb098c7c199dbe97be74f49e
Author: Andrew Mashenkov <an...@gmail.com>
AuthorDate: Mon Jan 10 18:00:06 2022 +0300
Drop down log level from error to warn for some user operation failures.
---
.../processors/odbc/ClientListenerNioListener.java | 5 ++++-
.../query/h2/twostep/GridMapQueryExecutor.java | 21 ++++++++++++---------
2 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerNioListener.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerNioListener.java
index 40f66d6..25b4b40 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerNioListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerNioListener.java
@@ -223,7 +223,10 @@ public class ClientListenerNioListener extends GridNioServerListenerAdapter<Clie
catch (Throwable e) {
handler.unregisterRequest(req.requestId());
- U.error(log, "Failed to process client request [req=" + req + ", msg=" + e.getMessage() + "]", e);
+ if (e instanceof Error)
+ U.error(log, "Failed to process client request [req=" + req + ", msg=" + e.getMessage() + "]", e);
+ else
+ U.warn(log, "Failed to process client request [req=" + req + ", msg=" + e.getMessage() + "]", e);
ses.send(parser.encode(handler.handleException(e, req)));
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
index d8727c2..3144e9e 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMapQueryExecutor.java
@@ -73,7 +73,6 @@ import org.apache.ignite.internal.processors.tracing.MTC;
import org.apache.ignite.internal.processors.tracing.MTC.TraceSurroundings;
import org.apache.ignite.internal.processors.tracing.Span;
import org.apache.ignite.internal.processors.tracing.SpanType;
-import org.apache.ignite.internal.util.lang.GridPlainCallable;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.internal.util.typedef.internal.CU;
@@ -242,8 +241,8 @@ public class GridMapQueryExecutor {
Span span = MTC.span();
- ctx.closure().callLocal(
- (GridPlainCallable<Void>)() -> {
+ ctx.closure().runLocal(
+ () -> {
try (TraceSurroundings ignored = MTC.supportContinual(span)) {
onQueryRequest0(node,
req.queryId(),
@@ -266,8 +265,9 @@ public class GridMapQueryExecutor {
dataPageScanEnabled,
treatReplicatedAsPartitioned
);
-
- return null;
+ }
+ catch (Throwable e) {
+ sendError(node, req.requestId(), e);
}
},
QUERY_POOL);
@@ -566,12 +566,15 @@ public class GridMapQueryExecutor {
if (qryRetryErr != null)
sendError(node, reqId, qryRetryErr);
else {
- U.error(log, "Failed to execute local query.", e);
-
- sendError(node, reqId, e);
+ if (e instanceof Error) {
+ U.error(log, "Failed to execute local query.", e);
- if (e instanceof Error)
throw (Error)e;
+ }
+
+ U.warn(log, "Failed to execute local query.", e);
+
+ sendError(node, reqId, e);
}
}
}