You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/02/01 19:55:27 UTC

[GitHub] [ignite] ptupitsyn commented on a change in pull request #8732: IGNITE-14071: Test for messaging type auto resolve.

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



##########
File path: modules/platforms/dotnet/Apache.Ignite.Core/Impl/Messaging/Messaging.cs
##########
@@ -87,35 +87,68 @@ public IClusterGroup ClusterGroup
         public void Send(object message, object topic = null)
         {
             IgniteArgumentCheck.NotNull(message, "message");
+            
+            bool locRegisterSameJavaType = Marshaller.RegisterSameJavaTypeTl.Value;
 
-            DoOutOp((int) Op.Send, topic, message);
+            Marshaller.RegisterSameJavaTypeTl.Value = true;
+
+            try
+            {
+                DoOutOp((int) Op.Send, topic, message);
+            }
+            finally
+            {
+                Marshaller.RegisterSameJavaTypeTl.Value = locRegisterSameJavaType;
+            }
         }
 
         /** <inheritdoc /> */
         public void SendAll(IEnumerable messages, object topic = null)
         {
             IgniteArgumentCheck.NotNull(messages, "messages");
 
-            DoOutOp((int) Op.SendMulti, writer =>
+            bool locRegisterSameJavaType = Marshaller.RegisterSameJavaTypeTl.Value;
+
+            Marshaller.RegisterSameJavaTypeTl.Value = true;

Review comment:
       As [discussed on the dev list](http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSSION-Net-BinaryTypes-transparency-td50998.html), this Java type registration behavior can be only enabled when we are calling Java user code. For `Compute` and `Services` this can be determined precisely. But for `Messaging` we don't know whether listeners are in .NET or Java, so this is a compatibility risk.




----------------------------------------------------------------
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:
users@infra.apache.org