[ 
https://issues.apache.org/jira/browse/IGNITE-25647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17985254#comment-17985254
 ] 

Ivan Bessonov commented on IGNITE-25647:
----------------------------------------

How to address these issues:
 * First of all, we need more compatibility tests that would cover these 
specific points.
 * Just like WAL records in AI2, raft commands should be unmodifiable after 
release. So, only two options are possible:

 ** You add a new property. In such a case you must do it by creating a 
subclass.
 ** You change existing property. In such a case you must extract all common 
[between old and new] properties into a base class, and have an hierarchy.
 * In code, we always create the most recent version of the command, but upon 
reading we must make sure that we can process all possible versions of commands.
 * Naming and hierarchies in each particular case are up to developer, but 
please make sure to not make code too much worse.

> Fix RAFT messages incompatibility
> ---------------------------------
>
>                 Key: IGNITE-25647
>                 URL: https://issues.apache.org/jira/browse/IGNITE-25647
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Vadim Pakhnushev
>            Assignee: Ivan Bessonov
>            Priority: Major
>              Labels: ignite-3
>
> When upgrading from 3.0.0 to current version, node can't start with the 
> following exception:
> {noformat}
> Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 9 out of bounds 
> for length 6
>       at 
> org.apache.ignite.internal.raft.util.OptimizedStream.readInt(OptimizedStream.java:97)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.raft.util.OptimizedStream.readShort(OptimizedStream.java:68)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.network.direct.stream.DirectByteBufferStreamImplV1.readMessage(DirectByteBufferStreamImplV1.java:1586)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.network.direct.DirectMessageReader.readMessage(DirectMessageReader.java:473)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.partition.replicator.network.command.UpdateCommandDeserializer.readMessage(UpdateCommandDeserializer.java:39)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.network.direct.stream.DirectByteBufferStreamImplV1.readMessage(DirectByteBufferStreamImplV1.java:1604)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.raft.util.OptimizedMarshaller.unmarshall(OptimizedMarshaller.java:170)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.table.distributed.schema.PartitionCommandsMarshallerImpl.unmarshall(PartitionCommandsMarshallerImpl.java:62)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.table.distributed.schema.ThreadLocalPartitionCommandsMarshaller.unmarshall(ThreadLocalPartitionCommandsMarshaller.java:57)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.raft.server.impl.JraftServerImpl$WriteCommandIterator.next(JraftServerImpl.java:927)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.raft.server.impl.JraftServerImpl$WriteCommandIterator.next(JraftServerImpl.java:901)
>  ~[main/:?]
>       at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133) 
> ~[?:?]
>       at 
> org.apache.ignite.internal.table.distributed.raft.PartitionListener.onWrite(PartitionListener.java:249)
>  ~[main/:?]
>       at 
> org.apache.ignite.internal.raft.server.impl.JraftServerImpl$DelegatingStateMachine.onApply(JraftServerImpl.java:787)
>  ~[main/:?]{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to