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

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

{panel:title=Branch: [pull/8346/head] Base: [master] : Possible Blockers 
(14)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}MVCC Cache 7{color} [[tests 0 TIMEOUT , Exit Code 
|https://ci.ignite.apache.org/viewLog.html?buildId=5653734]]

{color:#d04437}Cache 5{color} [[tests 
1|https://ci.ignite.apache.org/viewLog.html?buildId=5653697]]
* IgniteCacheTestSuite5: CacheLateAffinityAssignmentTest.testBlockedFinishMsg4 
- Test has low fail rate in base branch 2,7% and is not flaky

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

{color:#d04437}PDS 2{color} [[tests 
1|https://ci.ignite.apache.org/viewLog.html?buildId=5653711]]
* IgnitePdsTestSuite2: 
IgniteNodeStoppedDuringDisableWALTest.test[AFTER_WRITE_KEY_TO_META_STORE] - 
Test has low fail rate in base branch 0,0% and is not flaky

{color:#d04437}Platform .NET (Core Linux){color} [[tests 
4|https://ci.ignite.apache.org/viewLog.html?buildId=5653715]]
* dll: BinaryBuilderSelfTestFullFooter.TestStringDateGuidEnum - Test has low 
fail rate in base branch 0,0% and is not flaky
* dll: BinaryBuilderSelfTestSimpleName.TestStringDateGuidEnum - Test has low 
fail rate in base branch 0,0% and is not flaky
* dll: BinaryBuilderSelfTest.TestStringDateGuidEnum - Test has low fail rate in 
base branch 0,0% and is not flaky
* dll: BinaryBuilderSelfTestDynamicRegistration.TestStringDateGuidEnum - Test 
has low fail rate in base branch 0,0% and is not flaky

{color:#d04437}Platform .NET{color} [[tests 
4|https://ci.ignite.apache.org/viewLog.html?buildId=5653714]]
* exe: BinaryBuilderSelfTest.TestStringDateGuidEnum - Test has low fail rate in 
base branch 0,0% and is not flaky
* exe: BinaryBuilderSelfTest.TestStringDateGuidEnum - Test has low fail rate in 
base branch 0,0% and is not flaky
* exe: BinaryBuilderSelfTest.TestStringDateGuidEnum - Test has low fail rate in 
base branch 0,0% and is not flaky
* exe: BinaryBuilderSelfTest.TestStringDateGuidEnum - Test has low fail rate in 
base branch 0,0% and is not flaky

{color:#d04437}Thin client: PHP{color} [[tests 0 Exit Code 
|https://ci.ignite.apache.org/viewLog.html?buildId=5653679]]

{color:#d04437}Client Nodes{color} [[tests 
1|https://ci.ignite.apache.org/viewLog.html?buildId=5653637]]
* IgniteClientReconnectTestSuite: 
IgniteClientReconnectApiExceptionTest.testErrorOnDisconnect - Test has low fail 
rate in base branch 0,0% and is not flaky

{panel}
{panel:title=Branch: [pull/8346/head] Base: [master] : New Tests 
(6)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Platform .NET (Core Linux){color} [[tests 
3|https://ci.ignite.apache.org/viewLog.html?buildId=5653715]]
* {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=5653714]]
* {color:#013220}exe: BinarySelfTest.TestBinaryField - PASSED{color}
* {color:#013220}exe: BinarySelfTest.TestBinaryField - PASSED{color}
* {color:#013220}exe: BinarySelfTest.TestBinaryField - PASSED{color}

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci.ignite.apache.org/viewLog.html?buildId=5653750&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