You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Denis Magda (JIRA)" <ji...@apache.org> on 2017/11/09 21:41:00 UTC

[jira] [Comment Edited] (IGNITE-6785) Affinity field name forced to be upper-case

    [ https://issues.apache.org/jira/browse/IGNITE-6785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16246598#comment-16246598 ] 

Denis Magda edited comment on IGNITE-6785 at 11/9/17 9:40 PM:
--------------------------------------------------------------

[~vozerov],

1. Removed the quotes at all. They were simply inherited from an original MySQL script.
2. Aligned the naming both in the script and source code.

However, still observe the same issues listed in the summary. See the updated project.

Furthermore,  {{KeyValueBinaryDataProcessing#migrateBetweenCities}} method, that updates two records with entry processors transactionally, either performs this simple operation for ~20 sec (!) or fails with Java Out of memory. By some reason the binary marshaller goes crazy when an entry processor is called on the server side. Do you reproduce this behavior? I started two servers nodes.


was (Author: dmagda):
[~vozerov],

1. Removed the quotes at all. They were simply inherited from an original MySQL script.
2. Aligned the naming both in the script and source code.

However, still observe the same issues listed in the summary. See the updated project.

Furthermore,  {{KeyValueBinaryDataProcessing#migrateBetweenCities}} method that updates two records with entry processors transactionally either performs this simple operation for ~20 sec (!) or fails with Java Out of memory. By some reason the binary marshaller goes crazy when an entry processor is called on the server side. Do you reproduce this behavior? I started two servers nodes.

> Affinity field name forced to be upper-case
> -------------------------------------------
>
>                 Key: IGNITE-6785
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6785
>             Project: Ignite
>          Issue Type: Task
>      Security Level: Public(Viewable by anyone) 
>          Components: sql
>    Affects Versions: 2.1
>            Reporter: Denis Magda
>            Assignee: Vladimir Ozerov
>            Priority: Critical
>              Labels: usability
>             Fix For: 2.4
>
>         Attachments: sql_bug.zip
>
>
> If an SQL schema and cache is created with CREATE TABLE command and a user wants to use key-value APIs creating its own custom key class, then (at least) the key  class's affinity field forced to be written in upper-case.
> Steps to reproduce using the project attached:
> * start a node with {{./ignite.sh ../examples/config/example-ignite.xml}}.
> * create {{City}} table using {{ignite_world.sql}}. SQLline is one of the quickest ways: https://apacheignite-sql.readme.io/docs/sqlline
> * Run {{KeyValueDataProcessing}} to catch the exception below
> {noformat}
> Exception in thread "main" class org.apache.ignite.binary.BinaryObjectException: Binary type has different affinity key fields [typeName=demo.model.CityKey, affKeyFieldName1=COUNTRYCODE, affKeyFieldName2=countryCode]
> 	at org.apache.ignite.internal.binary.BinaryUtils.mergeMetadata(BinaryUtils.java:987)
> {noformat} 
> If fact {{CityKey}} names the affinity field in the same way as in CREATE TABLE - {{countryCode}}.
> Next, run {{KeyValueBinaryDataProcessing}} to spot another weird thing:
> * BinaryObject key accepts `countryCode` as the affinity field name.
> * If to print our a binary object value then all the fields are in the upper-case (they were not defined this way in CREATE TABLE):
> {noformat}
> demo.model.City [idHash=1613627715, hash=-1386587499, DISTRICT=Noord-Holland, POPULATION=711200, NAME=Amsterdam]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)