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

Ignite TC Bot commented on IGNITE-13563:
----------------------------------------

{panel:title=Branch: [pull/8346/head] Base: [master] : Possible Blockers 
(20)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}PDS 1{color} [[tests 0 Exit Code 
|https://ci.ignite.apache.org/viewLog.html?buildId=5661143]]

{color:#d04437}MVCC Queries{color} [[tests 0 TIMEOUT , Exit Code 
|https://ci.ignite.apache.org/viewLog.html?buildId=5661111]]

{color:#d04437}Basic 1{color} [[tests 0 Exit Code 
|https://ci.ignite.apache.org/viewLog.html?buildId=5661106]]

{color:#d04437}Platform C++ CMake (Win x64 / Release){color} [[tests 0 
BuildFailureOnMessage 
|https://ci.ignite.apache.org/viewLog.html?buildId=5661182]]

{color:#d04437}Cache (Full API Multi JVM){color} [[tests 
16|https://ci.ignite.apache.org/viewLog.html?buildId=5661121]]
* org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite: 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest.
 - History for base branch is absent.
* org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite: 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest.
 - History for base branch is absent.
* org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite: 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest.
 - History for base branch is absent.
* org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite: 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.
 - History for base branch is absent.
* org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite: 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest.
 - History for base branch is absent.
* org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite: 
org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedOnheapMultiJvmFullApiSelfTest.
 - History for base branch is absent.
* org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite: 
org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.
 - History for base branch is absent.
* org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite: 
org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.
 - History for base branch is absent.
* org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite: 
org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedMultiJvmFullApiSelfTest.
 - History for base branch is absent.
* org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite: 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedMultiJvmFullApiSelfTest.
 - History for base branch is absent.
* org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite: 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedMultiJvmP2PDisabledFullApiSelfTest.
 - History for base branch is absent.
... and 5 tests blockers

{panel}
{panel:title=Branch: [pull/8346/head] Base: [master] : New Tests 
(22)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#00008b}Platform .NET (Core Linux){color} [[tests 
3|https://ci.ignite.apache.org/viewLog.html?buildId=5661148]]
* {color:#013220}dll: BinarySelfTest.TestBinaryField - PASSED{color}
* {color:#013220}dll: BinarySelfTestFullFooter.TestBinaryField - PASSED{color}
* {color:#013220}dll: BinarySelfTestSimpleName.TestBinaryField - PASSED{color}

{color:#00008b}Platform .NET{color} [[tests 
3|https://ci.ignite.apache.org/viewLog.html?buildId=5661147]]
* {color:#013220}exe: BinarySelfTest.TestBinaryField - PASSED{color}
* {color:#013220}exe: BinarySelfTest.TestBinaryField - PASSED{color}
* {color:#013220}exe: BinarySelfTest.TestBinaryField - PASSED{color}

{color:#00008b}Cache (Full API Multi JVM){color} [[tests 
16|https://ci.ignite.apache.org/viewLog.html?buildId=5661121]]
* 
{color:#8b0000}org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite:
 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest.
 - FAILED{color}
* 
{color:#8b0000}org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite:
 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest.
 - FAILED{color}
* 
{color:#8b0000}org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite:
 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest.
 - FAILED{color}
* 
{color:#8b0000}org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite:
 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest.
 - FAILED{color}
* 
{color:#8b0000}org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite:
 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest.
 - FAILED{color}
* 
{color:#8b0000}org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite:
 
org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedOnheapMultiJvmFullApiSelfTest.
 - FAILED{color}
* 
{color:#8b0000}org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite:
 
org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.
 - FAILED{color}
* 
{color:#8b0000}org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite:
 
org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.
 - FAILED{color}
* 
{color:#8b0000}org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite:
 
org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedMultiJvmFullApiSelfTest.
 - FAILED{color}
* 
{color:#8b0000}org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite:
 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedMultiJvmFullApiSelfTest.
 - FAILED{color}
* 
{color:#8b0000}org.apache.ignite.testsuites.IgniteCacheFullApiMultiJvmSelfTestSuite:
 
org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedMultiJvmP2PDisabledFullApiSelfTest.
 - FAILED{color}
... and 5 new tests

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci.ignite.apache.org/viewLog.html?buildId=5661183&buildTypeId=IgniteTests24Java8_RunAll]

> Deserializing IBinaryObject containing an IBinaryObject field fails
> -------------------------------------------------------------------
>
>                 Key: IGNITE-13563
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13563
>             Project: Ignite
>          Issue Type: Bug
>          Components: binary, platforms
>    Affects Versions: 2.8.1
>         Environment: Arch Linux (updated Oct 5): Linux 5.8.12, DotNet 
> 3.1.108, OpenJDK 1.8.0_265.
>            Reporter: Bojidar Marinov
>            Assignee: Bojidar Marinov
>            Priority: Major
>         Attachments: 0001-Fix-IBinaryObject-Deserialize.patch, Program.cs
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When one has a data object which has an IBinaryObject property, like so:
> {code:c#}
> class Model {
>     public IBinaryObject Value { get; set; }
> }
> {code}
> .. and proceeds to fill that property with an IBinaryObject of an unknown 
> type (e.g. a binary object from a cache that has WithKeepBinary on):
> {code:c#}
> var binary = ignite.GetBinary();
> var model = new Model { Value = binary.GetBuilder("nonexistent").Build() };
> {code}
> Then, the resulting object is savable/loadable from caches, as expected:
> {code:c#}
> var cache = ignite.GetOrCreateCache<string, Model>("models");
> cache.Put("model", model);
> var modelFromCache = cache.Get("model"); // Equivalent to model
> {code}
> However, trying to convert the object to IBinaryObject (using ToBinary) and 
> then deserializing that manually fails:
> {code:c#}
> var binaryObject = binary.ToBinary<IBinaryObject>(model);
> var modelFromBinary = binaryObject.Deserialize<Model>(); // Unknown pair 
> [platformId=1, typeId=486454369]
> {code}
> I have attached a program which reproduces the issue.
> ----
> After investigating the issue, it seems to occur because 
> {{BinaryObject.Deserialize<T>()}} uses {{BinaryMode.Deserialize}}. This, in 
> turn, causes {{BinaryReader.ReadBinaryObject()}} to call 
> {{BinaryReader.Deserialize()}} for the first {{BinaryTypeId.Binary}} object 
> found (while switching to {{BinaryMode.KeepBinary}} for nested objects). 
> Then, {{BinaryReader.ReadFullObject()}} gets called, and not knowing better, 
> tries to deserialize the object of a nonexistent type.
> Now, {{BinaryMode.Deserialize}} is also used by {{CacheClient}}. However, 
> upon further investigation of the values passed to {{Marshaller.Unmarshall}}, 
> {{CacheClient}} unmarshalls values starting with {{BinaryTypeId.Binary}}, 
> while {{BinaryObject}} unmarshalls values starting directly with 
> {{BinaryUtils.HdrFull}}; thus, {{BinaryReader}} functions correctly for 
> caches but fails with binary objects.
> Due to the this, I think the proper fix would be to change 
> {{BinaryObject.Deserialize<T>()}} to use {{BinaryMode.KeepBinary}}. I have 
> attached a patch file containing that fix and an accompanying test.



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

Reply via email to