This is an automated email from the ASF dual-hosted git repository.
vpyatkov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new bd896fcf87 IGNITE-22597 Use SMFullThrowable when exception in user's
state machine happens. (#4022)
bd896fcf87 is described below
commit bd896fcf87605d156f4197ffacd8a5157e4f5fde
Author: Mirza Aliev <[email protected]>
AuthorDate: Tue Jul 2 10:47:55 2024 +0400
IGNITE-22597 Use SMFullThrowable when exception in user's state machine
happens. (#4022)
---
.../apache/ignite/raft/jraft/rpc/impl/ActionRequestProcessor.java | 8 ++++----
.../apache/ignite/raft/jraft/rpc/impl/SMCompactedThrowable.java | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/ActionRequestProcessor.java
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/ActionRequestProcessor.java
index d65161a8ba..5255c727f4 100644
---
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/ActionRequestProcessor.java
+++
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/ActionRequestProcessor.java
@@ -184,7 +184,7 @@ public class ActionRequestProcessor implements
RpcProcessor<ActionRequest> {
@Override
public void result(Serializable res) {
if (res instanceof Throwable) {
- sendSMError(rpcCtx, (Throwable)res, true);
+ sendSMError(rpcCtx, (Throwable)res, false);
return;
}
@@ -222,7 +222,7 @@ public class ActionRequestProcessor implements
RpcProcessor<ActionRequest> {
@Override public void result(Serializable res)
{
if (res instanceof Throwable) {
- sendSMError(rpcCtx, (Throwable)res,
true);
+ sendSMError(rpcCtx, (Throwable)res,
false);
return;
}
@@ -252,7 +252,7 @@ public class ActionRequestProcessor implements
RpcProcessor<ActionRequest> {
@Override public void result(Serializable res) {
if (res instanceof Throwable) {
- sendSMError(rpcCtx, (Throwable)res, true);
+ sendSMError(rpcCtx, (Throwable)res, false);
return;
}
@@ -307,7 +307,7 @@ public class ActionRequestProcessor implements
RpcProcessor<ActionRequest> {
ctx.sendResponse(resp);
- LOG.info("Error occurred on a user's state machine", th);
+ LOG.warn("Error occurred on a user's state machine", th);
}
/**
diff --git
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/SMCompactedThrowable.java
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/SMCompactedThrowable.java
index ff722c0501..7cdfa55f1d 100644
---
a/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/SMCompactedThrowable.java
+++
b/modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/impl/SMCompactedThrowable.java
@@ -21,6 +21,9 @@ import java.io.Serializable;
/**
* Compacted version of throwable from client's state machine logic.
+ * <p>
+ * Note that this class does not preserve {@code traceId} and {@code code}
from org.apache.ignite.lang.TraceableException,
+ * so {@link SMThrowable} should be used instead.
*/
public class SMCompactedThrowable implements SMThrowable, Serializable {
/** Throwable class name. */