You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Tupitsyn (Jira)" <ji...@apache.org> on 2021/02/02 11:56:00 UTC
[jira] [Updated] (IGNITE-13588) .NET: Incorrect binary type name is
registered for generic query types
[ https://issues.apache.org/jira/browse/IGNITE-13588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Tupitsyn updated IGNITE-13588:
------------------------------------
Release Note: .NET: Fixed SQL type name for generic query types
> .NET: Incorrect binary type name is registered for generic query types
> ----------------------------------------------------------------------
>
> Key: IGNITE-13588
> URL: https://issues.apache.org/jira/browse/IGNITE-13588
> Project: Ignite
> Issue Type: Bug
> Components: platforms
> Affects Versions: 2.9, 2.8.1
> Environment: Apache Ignite: v2.8.1
> JDK: v1.8
> .NET Core: v3.1
> Reporter: Danut Radoaica
> Assignee: Pavel Tupitsyn
> Priority: Major
> Labels: .NET, 2.9.1-rc
> Fix For: 2.11
>
> Attachments: Untitled.png
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> Using a generic type as a QueryEntity value type results in a wrong type name being registered in QueryEntities and a wrong typeId being calculated for the binary metadata:
> {code}
> var ignite = Ignition.Start(TestUtils.GetTestConfiguration());
> var cfg = new CacheConfiguration(TestUtils.TestName)
> {
> QueryEntities = new[] {new QueryEntity(typeof(int), typeof(GenericTest<string>))}
> };
> var cache = ignite.GetOrCreateCache<int, GenericTest<string>>(cfg);
> cache[1] = new GenericTest<string> {Prop = "foo"};
> var binType = ignite.GetBinary().GetBinaryTypes().Single();
> Assert.AreEqual(-590542188, binType.TypeId); // 945954881 with QueryEntity
> Assert.AreEqual(
> "Apache.Ignite.Core.Tests.Cache.Query.CacheQueriesCodeConfigurationTest+GenericTest`1[[System.String]]",
> cache.GetConfiguration().QueryEntities.Single().ValueTypeName); // Includes assembly name with query entity
> {code}
> {{BinaryUtils.GetSqlTypeName}} returns Type.FullName, which includes assembly-qualified type names for all generic type arguments.
> This causes the following problems:
> * SQL type name includes assembly versions, so queries stop working if there is a version change
> * Incorrect binary type id is registered, because due to IGNITE-13160 changes the string from {{BinaryUtils.GetSqlTypeName}} gets passed back to {{UnmanagedCallbacks.BinaryTypeGet}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)