anton-vinogradov commented on code in PR #13095:
URL: https://github.com/apache/ignite/pull/13095#discussion_r3658260020


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/message/QueryBatchMessage.java:
##########
@@ -60,8 +66,7 @@ public QueryBatchMessage(UUID qryId, long fragmentId, long 
exchangeId, int batch
         this.exchangeId = exchangeId;
         this.batchId = batchId;
         this.last = last;
-
-        mRows = rows.stream().map(o -> o == null ? null : new 
GenericValueMessage(o)).collect(Collectors.toList());
+        this.rows = rows;

Review Comment:
   Agreed on both points — reverted the constructor: the conversion runs on the 
caller thread, not on a NIO one, so making it lazy bought little and cost API 
surface. QueryBatchMessage is no longer a MarshallableMessage either (the 
marshal/unmarshal hooks are gone), so it now differs from master only by 
implementing DeferredUnmarshalMessage; the `loc` flag and the 
MessageService.localNodeId() addition it required are gone as well. F.view 
stays out for the reason you name: mRows is iterated twice on the send path 
(the generated marshaller fills each wrapper's bytes, then the serializer 
writes the collection), so a lazy view would hand fresh, unmarshalled wrappers 
to the second pass.



##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/message/QueryCloseMessage.java:
##########
@@ -18,13 +18,13 @@
 package org.apache.ignite.internal.processors.query.calcite.message;
 
 import java.util.UUID;
+import org.apache.ignite.internal.DeferredUnmarshalMessage;
 import org.apache.ignite.internal.Order;
-import org.apache.ignite.plugin.extensions.communication.Message;
 
 /**
  *
  */
-public class QueryCloseMessage implements Message {
+public class QueryCloseMessage implements DeferredUnmarshalMessage {

Review Comment:
   Fair — reduced. The marker is now only on the four messages that actually 
carry a marshalled payload (QueryStartRequest, QueryBatchMessage, 
QueryStartResponse, CalciteErrorMessage) — exactly the ones a marshaller is 
generated for. QueryCloseMessage, QueryInboxCloseMessage and 
QueryBatchAcknowledgeMessage no longer implement it: for them the generic pass 
resolves no marshaller and returns, so it is a no-op either way. The 
receive-side ownership filter went back to 
CalciteMessageFactory.isCalciteMessage (the direct-type range, as on master), 
so the marker no longer doubles as the topic filter.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to