[
https://issues.apache.org/jira/browse/IGNITE-22597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17861321#comment-17861321
]
Mirza Aliev commented on IGNITE-22597:
--------------------------------------
[~v.pyatkov]
This is from server side (it also will be improved with traceId and code here
https://issues.apache.org/jira/browse/IGNITE-22634)
{noformat}
[2024-07-01T18:39:23,138][WARN
][%isnt_tmpar_0%JRaft-FSMCaller-Disruptor_stripe_0-0][ActionRequestProcessor]
Error occurred on a user's state machine
org.apache.ignite.internal.lang.IgniteInternalException: Expected message
at
org.apache.ignite.internal.table.distributed.raft.PartitionListener.handleUpdateCommand(PartitionListener.java:277)
~[main/:?]
at
org.apache.ignite.internal.table.distributed.raft.PartitionListener.lambda$onWrite$1(PartitionListener.java:210)
{noformat}
and like this from a client side
{noformat}
org.apache.ignite.lang.IgniteException: IGN-CMN-65535
TraceId:27960e0f-a0e9-4a11-9370-03ab1c7af36e Expected message
at
org.apache.ignite.internal.lang.IgniteExceptionMapperUtil.mapToPublicException(IgniteExceptionMapperUtil.java:118)
at
org.apache.ignite.internal.lang.IgniteExceptionMapperUtil.lambda$convertToPublicFuture$2(IgniteExceptionMapperUtil.java:138)
...
at
org.apache.ignite.raft.jraft.disruptor.StripedDisruptor$StripeEntryHandler.onEvent(StripedDisruptor.java:326)
at
org.apache.ignite.raft.jraft.disruptor.StripedDisruptor$StripeEntryHandler.onEvent(StripedDisruptor.java:283)
at
com.lmax.disruptor.BatchEventProcessor.processEvents(BatchEventProcessor.java:167)
at
com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:122)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.apache.ignite.internal.lang.IgniteInternalException:
IGN-CMN-65535 TraceId:27960e0f-a0e9-4a11-9370-03ab1c7af36e Expected message
at
org.apache.ignite.internal.table.distributed.raft.PartitionListener.handleUpdateCommand(PartitionListener.java:277)
at
org.apache.ignite.internal.table.distributed.raft.PartitionListener.lambda$onWrite$1(PartitionListener.java:210)
... 13 more
Caused by: java.lang.RuntimeException: TEST
at
org.apache.ignite.internal.table.distributed.raft.PartitionListener.handleUpdateCommand(PartitionListener.java:275)
... 14 more
{noformat}
> Exception trace id is not propagated from RAFT listener
> -------------------------------------------------------
>
> Key: IGNITE-22597
> URL: https://issues.apache.org/jira/browse/IGNITE-22597
> Project: Ignite
> Issue Type: Bug
> Reporter: Vladislav Pyatkov
> Assignee: Mirza Aliev
> Priority: Major
> Labels: ignite-3
> Attachments: error_log.txt
>
>
> h3. Motivation
> The trace id is generated at the place where the original exception was
> created and should be propogated to other derevatives. Right now, we send
> only an exception message and class name to the RAFT listener response.
> {code:java}
> private void sendSMError(RpcContext ctx, Throwable th, boolean compacted) {
> RpcRequests.SMErrorResponse resp = factory.sMErrorResponse()
> .error(compacted ? new SMCompactedThrowable(th) : new
> SMFullThrowable(th))
> .build();
> ctx.sendResponse(resp);
> LOG.info("Error occurred on a user's state machine", th);
> }
> {code}
> Hence, we cannot restore the trace id and create an exception with a new
> trace id:
> {code:java}
> Throwable restoredTh = (Throwable)
> Class.forName(compactedThrowable.throwableClassName())
> .getConstructor(String.class)
> .newInstance(compactedThrowable.throwableMessage());
> fut.completeExceptionally(restoredTh);
> {code}
> h3. Definition of done
> * Both attached logs should be logged with the same trace id.
> * Massage in the RAFT listener should be logged in error (or warning) level.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)