You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Konstantin Orlov (Jira)" <ji...@apache.org> on 2024/03/12 09:54:00 UTC
[jira] [Resolved] (IGNITE-21362) Just inserted row not found when using KV api
[ https://issues.apache.org/jira/browse/IGNITE-21362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Orlov resolved IGNITE-21362.
---------------------------------------
Resolution: Fixed
Was fixed by IGNITE-19744
> Just inserted row not found when using KV api
> ---------------------------------------------
>
> Key: IGNITE-21362
> URL: https://issues.apache.org/jira/browse/IGNITE-21362
> Project: Ignite
> Issue Type: Bug
> Reporter: Konstantin Orlov
> Priority: Blocker
> Labels: ignite-3
>
> Consider the following scenario:
> {code:java}
> sql("CREATE TABLE my (c1 INT, c2 INT, c3 INT, PRIMARY KEY (c2, c1))"); // mind the order of columns in PK definition
> Tuple key = Tuple.create()
> .set("c1", 1)
> .set("c2", 2);
> Tuple val = Tuple.create()
> .set("c3", 3);
> KeyValueView<Tuple, Tuple> kv = igniteNode
> .tables()
> .table("my")
> .keyValueView();
> kv.put(null, key, val);
> Tuple result = kv.get(null, key); // <-- returns null here
> {code}
> Expected behaviour is to get result equals to {{val}} that we've just put to the table, but {{kv.get()}} returns {{null}} in this case. If we change the order of columns in PK definition to (c1, c2), then the test will pass.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)