[
https://issues.apache.org/jira/browse/IGNITE-20103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Tupitsyn resolved IGNITE-20103.
-------------------------------------
Resolution: Fixed
> Thin 3.0: AssertionError when reading old rows after schema update
> ------------------------------------------------------------------
>
> Key: IGNITE-20103
> URL: https://issues.apache.org/jira/browse/IGNITE-20103
> Project: Ignite
> Issue Type: Bug
> Components: thin client
> Affects Versions: 3.0.0-beta1
> Reporter: Pavel Tupitsyn
> Assignee: Pavel Tupitsyn
> Priority: Blocker
> Labels: ignite-3
> Fix For: 3.0.0-beta2
>
>
> Client handler does not support *UpgradingRowAdapter*:
> {code}
> java.lang.AssertionError: Tuple element count mismatch: 2 != 1
> at
> org.apache.ignite.client.handler.requests.table.ClientTableCommon.writeTuple(ClientTableCommon.java:139)
> at
> org.apache.ignite.client.handler.requests.table.ClientTableCommon.writeTupleOrNil(ClientTableCommon.java:103)
> at
> org.apache.ignite.client.handler.requests.table.ClientTupleGetRequest.lambda$process$0(ClientTupleGetRequest.java:55)
> at
> java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714)
> {code}
> *Reproducer*
> {code:java}
> @Test
> void testGetOldRowAfterSchemaUpdate() throws InterruptedException {
> IgniteClient client = client();
> Session ses = client.sql().createSession();
> // Create table, insert data.
> String tableName = "testGetOldRowAfterSchemaUpdate";
> ses.execute(null, "CREATE TABLE " + tableName + "(ID INT NOT NULL
> PRIMARY KEY)");
> waitForTableOnAllNodes(tableName);
> RecordView<Tuple> recordView =
> client.tables().table(tableName).recordView();
> Tuple rec = Tuple.create().set("ID", 1);
> recordView.insert(null, rec);
> // Modify table and get old row.
> ses.execute(null, "ALTER TABLE " + tableName + " ADD COLUMN NAME
> VARCHAR NOT NULL");
> assertNull(recordView.get(null, rec).stringValue(1));
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)