[
https://issues.apache.org/jira/browse/IGNITE-22386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Bessonov updated IGNITE-22386:
-----------------------------------
Description:
{code:java}
byte[] revisionBytes = ByteUtils.longToBytes(revision);
Iif iif = iif(
notExists(partChangeTriggerKey).or(value(partChangeTriggerKey).lt(revisionBytes)),
{code}
Code above has a bug - "longToBytes" is not a suitable serialization format for
preserving natural comparison order used in "lt". We must fix it, because it
leads to occasional false-positive and false-negative condition evaluation
It also leads to flaky tests, obviously
was:
{code:java}
byte[] revisionBytes = ByteUtils.longToBytes(revision);
Iif iif = iif(
notExists(partChangeTriggerKey).or(value(partChangeTriggerKey).lt(revisionBytes)),
{code}
Code above has a bug - "longToBytes" is not a suitable serialization format for
preserving natural comparison order used in "lt". We must fix it, because it
leads to occasional false-positive and false-negative condition evaluation
> Many usages of wrong revision serialization in metastorage commands
> -------------------------------------------------------------------
>
> Key: IGNITE-22386
> URL: https://issues.apache.org/jira/browse/IGNITE-22386
> Project: Ignite
> Issue Type: Bug
> Reporter: Ivan Bessonov
> Assignee: Ivan Bessonov
> Priority: Major
> Labels: ignite-3
>
> {code:java}
> byte[] revisionBytes = ByteUtils.longToBytes(revision);
> Iif iif = iif(
> notExists(partChangeTriggerKey).or(value(partChangeTriggerKey).lt(revisionBytes)),
> {code}
> Code above has a bug - "longToBytes" is not a suitable serialization format
> for preserving natural comparison order used in "lt". We must fix it, because
> it leads to occasional false-positive and false-negative condition evaluation
> It also leads to flaky tests, obviously
--
This message was sent by Atlassian Jira
(v8.20.10#820010)