[
https://issues.apache.org/jira/browse/IGNITE-27035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18037974#comment-18037974
]
Ivan Bessonov commented on IGNITE-27035:
----------------------------------------
What happened:
* Metastorage clients decides to execute a "put" operation, for example. This
client happens to be the leader of metastorage raft group.
* It creates a "put command instance" with a null value of "safeTime".
* Leader sends it to itself.
* It sets the "safeTime" value before replication.
* For some reason leader retries sending this command via raft service. This
leads to it being eventually executed twice.
* It sets the "safeTime" value before replication the second time, on the same
instance of "put command".
* When applying the command on a leader, we don't deserialize it from "byte[]"
representation for the sake of performance.
* This leads to applying the same command with the same "safeTime" value two
times, which is a bug.
Fix - don't modify the "safeTime" of original instance. Always create a copy
and modify/replicate it instead, it is safer.
> Double metastorage event processing
> -----------------------------------
>
> Key: IGNITE-27035
> URL: https://issues.apache.org/jira/browse/IGNITE-27035
> Project: Ignite
> Issue Type: Bug
> Reporter: Ivan Bessonov
> Assignee: Ivan Bessonov
> Priority: Major
> Labels: ignite-3
> Fix For: 3.2
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {code:java}
> Critical system error detected. Will be handled accordingly to configured
> handler: Unable to start Idle Safe Time scheduler ... 20:00:42 Caused by:
> java.lang.AssertionError: UpdateOnlyRevisionEvent [newRevision=12,
> timestamp=HybridTimestamp [physical=2025-10-16 20:00:42:001 +0000, logical=0,
> composite=115385620365377536]] 20:00:42 at
> org.apache.ignite.internal.metastorage.server.persistence.RocksDbKeyValueStorage.collectUpdateRevisionEventsFromStorage(RocksDbKeyValueStorage.java:1231)
> 20:00:42 at
> org.apache.ignite.internal.metastorage.server.persistence.RocksDbKeyValueStorage.startWatches(RocksDbKeyValueStorage.java:934)
> 20:00:42 at
> org.apache.ignite.internal.metastorage.impl.MetaStorageManagerImpl.lambda$deployWatches$32(MetaStorageManagerImpl.java:870)
> 20:00:42 at
> org.apache.ignite.internal.util.IgniteUtils.inBusyLock(IgniteUtils.java:912)
> 20:00:42 at
> org.apache.ignite.internal.metastorage.impl.MetaStorageManagerImpl.lambda$deployWatches$33(MetaStorageManagerImpl.java:869)
> 20:00:42 at
> java.base/java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:757)
> 20:00:42 ... 9 more
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)