ptupitsyn commented on a change in pull request #8724:
URL: https://github.com/apache/ignite/pull/8724#discussion_r566761874



##########
File path: 
modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
##########
@@ -1084,7 +1084,7 @@ public static void WriteArray(Array val, BinaryWriter 
ctx, int? elemTypeId = nul
             stream.WriteInt(val.Length);
 
             for (int i = 0; i < val.Length; i++)
-                ctx.Write(val.GetValue(i));
+                ctx.WriteObjectDetached(val.GetValue(i), parentCollection: 
val);

Review comment:
       `Write` supports circular references, so we can't write everything in 
detached mode.
   
   Yes, this feature introduces a lot of complexity, and possibly degrades 
performance due to handle tracking. Hopefully we'll get rid of this on 3.0, but 
for 2.x we have to maintain the compatibility.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to