zuston commented on code in PR #1469:
URL: 
https://github.com/apache/incubator-uniffle/pull/1469#discussion_r1458194921


##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -478,22 +478,27 @@ public long requireBuffer(
         throw new NoBufferForHugePartitionException(errorMessage);
       }
     }
-    return requireBuffer(requireSize);
+    return requireBuffer(appId, requireSize);
   }
 
-  public long requireBuffer(int requireSize) {
+  public long requireBuffer(String appId, int requireSize) {
     if (shuffleBufferManager.requireMemory(requireSize, true)) {
       long requireId = requireBufferId.incrementAndGet();
       requireBufferIds.put(
           requireId,
-          new PreAllocatedBufferInfo(requireId, System.currentTimeMillis(), 
requireSize));
+          new PreAllocatedBufferInfo(appId, requireId, 
System.currentTimeMillis(), requireSize));
       return requireId;
     } else {
       LOG.error("Failed to require buffer, require size: {}", requireSize);
       throw new NoBufferException("No Buffer For Regular Partition, 
requireSize: " + requireSize);
     }
   }
 
+  public long requireBuffer(int requireSize) {
+    // appId of EMPTY means the client uses the old version that should be 
upgraded.

Review Comment:
   The appId of requireBuffer proto is introduce in #471 . So if using the 
older version client, the appId may be empty.



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