advancedxy commented on code in PR #445:
URL: https://github.com/apache/incubator-uniffle/pull/445#discussion_r1056252851


##########
server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferManager.java:
##########
@@ -431,20 +436,28 @@ private Map<String, Set<Integer>> pickFlushedShuffle() {
     long expectedFlushSize = highWaterMark - lowWaterMark;
     long pickedFlushSize = 0L;
     int printIndex = 0;
+    int printIgnoreIndex = 0;
     int printMax = 10;
     for (Map.Entry<String, AtomicLong> entry : sizeList) {
       long size = entry.getValue().get();
-      pickedFlushSize += size;
       String appIdShuffleIdKey = entry.getKey();
-      addPickedShuffle(appIdShuffleIdKey, pickedShuffle);
-      // print detail picked info
-      if (printIndex < printMax) {
-        LOG.info("Pick application_shuffleId[{}] with {} bytes", 
appIdShuffleIdKey, size);
-        printIndex++;
-      }
-      if (pickedFlushSize > expectedFlushSize) {
-        LOG.info("Finish flush pick with {} bytes", pickedFlushSize);
-        break;
+      if (size > this.shuffleFlushThreshold) {

Review Comment:
   > Emm.. If having this possibility, we should take consideration in our 
design instead of hoping not happening in users environment.
   
   😂. The option is the safe bet, and the user/admin should take responsibility 
for what they are configuring. Take the 
   `SERVER_BUFFER_CAPACITY` and low/high watermark for analog: 
   1. do we need to take considerations when user misconfigured buffer_capacity 
to some extremely small value, say 1M.
   2. do we need to take considerations when low/high are equal, which makes 
flush process one shuffle one time
   Did you occurred anything similar in your prod envs?



##########
server/src/main/java/org/apache/uniffle/server/buffer/ShuffleBufferManager.java:
##########
@@ -431,20 +436,28 @@ private Map<String, Set<Integer>> pickFlushedShuffle() {
     long expectedFlushSize = highWaterMark - lowWaterMark;
     long pickedFlushSize = 0L;
     int printIndex = 0;
+    int printIgnoreIndex = 0;
     int printMax = 10;
     for (Map.Entry<String, AtomicLong> entry : sizeList) {
       long size = entry.getValue().get();
-      pickedFlushSize += size;
       String appIdShuffleIdKey = entry.getKey();
-      addPickedShuffle(appIdShuffleIdKey, pickedShuffle);
-      // print detail picked info
-      if (printIndex < printMax) {
-        LOG.info("Pick application_shuffleId[{}] with {} bytes", 
appIdShuffleIdKey, size);
-        printIndex++;
-      }
-      if (pickedFlushSize > expectedFlushSize) {
-        LOG.info("Finish flush pick with {} bytes", pickedFlushSize);
-        break;
+      if (size > this.shuffleFlushThreshold) {

Review Comment:
   > Emm.. If having this possibility, we should take consideration in our 
design instead of hoping not happening in users environment.
   
   😂. The option is the safe bet, and the user/admin should take responsibility 
for what they are configuring. Take the 
   `SERVER_BUFFER_CAPACITY` and low/high watermark for analog: 
   1. do we need to take considerations when user misconfigured buffer_capacity 
to some extremely small value, say 1M.
   2. do we need to take considerations when low/high are equal, which makes 
flush process one shuffle one time
   
   
   Did you occurred anything similar in your prod envs?



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