[ https://issues.apache.org/jira/browse/IGNITE-2191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15094210#comment-15094210 ]
Artem Shutak edited comment on IGNITE-2191 at 1/12/16 4:38 PM: --------------------------------------------------------------- Root cause: - {{BinaryContext}} uses a simple name as a type name. As a result we pass a simple name to {{BinaryIdMapper.typeId(clsName)}} method. Proposal: # {{BinaryContext}} should use a full name as a type name. # We should have 2 different {{BinaryIdMapper}} implementations: #* {{BinaryInternalIdMapper}} - should use full names of classes to calculate typeId. #* {{BinaryPlatformIdMapper}} - should use simple names of classes to calculate typeId. This mapper is required for working .Net. # We should have configuration paramether to set which mapper will be used. Also, need to have a check that all nodes have an equal BinaryConfiguration. I've tried point 1 from the proposal and run some binary tests. Looks good. Waiting for full run on TC. One big open issue is a work of queries with full names (I expect problems with inner classes at least). Scope of works: - The points 2 and 3 from the proposal. - Fix tests after point 1. - Add tests for new mappers. - Queries and full names of classes. was (Author: ashutak): Root cause: - {{BinaryContext}} uses a simple name as a type name. As a result we pass a simple name to {{BinaryIdMapper.typeId(clsName)}} method. Proposal: 1. {{BinaryContext}} should use a full name as a type name. 2. We should have 2 different {{BinaryIdMapper}} implementations: - {{BinaryInternalIdMapper}} - should use full names of classes to calculate typeId. - {{BinaryPlatformIdMapper}} - should use simple names of classes to calculate typeId. This mapper is required for working .Net. 3. We should have configuration paramether to set which mapper will be used. Also, need to have a check that all nodes have an equal BinaryConfiguration. I've tried point 1 from the proposal and run some binary tests. Looks good. Waiting for full run on TC. One big open issue is a work of queries with full names (I expect problems with inner classes at least). Scope of works: - The points 2 and 3 from the proposal. - Fix tests after point 1. - Add tests for new mappers. - Queries and full names of classes. > Binary marshaller: support user classes with the same simple name > ----------------------------------------------------------------- > > Key: IGNITE-2191 > URL: https://issues.apache.org/jira/browse/IGNITE-2191 > Project: Ignite > Issue Type: Bug > Components: cache > Affects Versions: ignite-1.4 > Reporter: Denis Magda > Assignee: Artem Shutak > Priority: Critical > Labels: important > Fix For: 1.6 > > > Presently the user won't be able to use across the cluster object that have a > single simple name. > As an example if the user has 'org.comp.MyObject' and > 'org.apache.comp.MyObject' then he won't be able to have them both in a > cluster because marshalling mechanism supports uniqueness at simple name > level only. > There are several reasons for that: > - interoperability with other platforms; > - queries that use simple name is their 'where' clause. > In general according to the API as a workaround the user can implement its > own BinaryIdMapper returning a precise id for every class. However there is a > bug in BinaryContext that passes simple name rather than a full name to a > BinaryIdMapper implementation. BinaryIdMapper must be fixed as well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)