You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Martin Raifer (Jira)" <ji...@apache.org> on 2020/04/02 14:44:00 UTC

[jira] [Commented] (IGNITE-11781) Invalid mode while deserializing JTS geometry objects with binary marshaller

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

Martin Raifer commented on IGNITE-11781:
----------------------------------------

ping?!

> Invalid mode while deserializing JTS geometry objects with binary marshaller
> ----------------------------------------------------------------------------
>
>                 Key: IGNITE-11781
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11781
>             Project: Ignite
>          Issue Type: Bug
>          Components: binary, clients, compute
>    Affects Versions: 2.7
>         Environment: Tested on a 64 bit Ubuntu 18.04, with OpenJDK 1.8.0_191, running Ignite 2.7
>            Reporter: Martin Raifer
>            Priority: Minor
>              Labels: newbie
>
> JTS Geometry objects can't be used as return types of compute jobs. Instead, _null_ is returned. Here's a minimal example showing the bug (and one example that shows that the bug is sometimes not triggered under slightly different conditions):
>  
> {code:java}
> // this prints "null" (wrong – the expected result would be "POINT EMPTY"):
> igniteCompute.broadcast(() -> (new GeometryFactory()).createPoint()).forEach(System.out::println);
> // this prints "[POINT EMPTY]" (correct):
> igniteCompute.broadcast(() -> Collections.singletonList((new GeometryFactory()).createPoint())).forEach(System.out::println);
> {code}
> This is caused by an invalid _BinaryWriteMode_ of _OPTIMIZED_ in [https://github.com/apache/ignite/blob/ignite-2.7/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java#L852] which then leads to a null value to be returned a few lines further down: [https://github.com/apache/ignite/blob/ignite-2.7/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java#L882]
> From what I can see, the _OPTIMIZED_ mode is set in [https://github.com/apache/ignite/blob/ignite-2.7/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java#L161] where the objects are explicitly tested against the _org.locationtech.jts.geom.Geometry_ class. This could be a regression introduced in https://issues.apache.org/jira/browse/IGNITE-4259 ?
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)