You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Kirill Tkalenko (Jira)" <ji...@apache.org> on 2024/06/28 07:40:00 UTC
[jira] [Commented] (IGNITE-22597) Exception trace id is not propagated from RAFT listener
[ https://issues.apache.org/jira/browse/IGNITE-22597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17860734#comment-17860734 ]
Kirill Tkalenko commented on IGNITE-22597:
------------------------------------------
This also needs to be fixed.
{noformat}
Caused by: org.apache.ignite.internal.storage.StorageException: IGN-STORAGE-1 TraceId:66de6dce-e425-4815-b910-295bc21f1172 Error while executing addWriteCommitted: [rowId=RowId [partitionId=8, uuid=0d5b2f79-3586-4ecc-a248-dcbb74926f78], tableId=10, partitionId=8]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.apache.ignite.internal.raft.RaftGroupServiceImpl.handleSmErrorResponse(RaftGroupServiceImpl.java:682)
... 27 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
> 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)