maobaolong commented on code in PR #2182:
URL: 
https://github.com/apache/incubator-uniffle/pull/2182#discussion_r1822383649


##########
common/src/main/java/org/apache/uniffle/common/netty/protocol/SendShuffleDataRequestV1.java:
##########
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.common.netty.protocol;
+
+import java.util.List;
+import java.util.Map;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import io.netty.buffer.ByteBuf;
+
+import org.apache.uniffle.common.ShufflePartitionedBlock;
+import org.apache.uniffle.common.util.ByteBufUtils;
+
+public class SendShuffleDataRequestV1 extends RequestMessage {

Review Comment:
   @jerqi Since @lwllvyb get way from work this week, I reply it instead of him.
   
   In our production scenario, we cannot ensure the upper compute product use 
our newest version at the same time, even we cannot ensure we upgrade all of 
the rss client at the same time, most of time, we update some of them.
   
   So the server have to handle old/new client request, as we all know, there 
are some memory/cpu waste about the old `SendShuffleDataRequest`, so the main 
motivation of this PR is to optimize this point, we have to take care of the 
old/new version client, so we invent `SendShuffleDataRequestV1` to handle the 
request from old client, and after this PR, we are ready to implement 
`SendShuffleDataRequestV2` to handle the new request from new client, this is a 
trade off between `clear code` and `consistency`.
   
   I found there are some similar case in the existing code, e.g. 
ShuffleTaskManager#requireBuffer, CoordinatorGrpcService#fetchClientConfV2 and 
ApplicationManager#refreshAppId and so on. 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to