maobaolong opened a new pull request, #1913:
URL: https://github.com/apache/incubator-uniffle/pull/1913

   <!--
   1. Title: [#<issue>] <type>(<scope>): <subject>
      Examples:
        - "[#123] feat(operator): support xxx"
        - "[#233] fix: check null before access result in xxx"
        - "[MINOR] refactor: fix typo in variable name"
        - "[MINOR] docs: fix typo in README"
        - "[#255] test: fix flaky test NameOfTheTest"
      Reference: https://www.conventionalcommits.org/en/v1.0.0/
   2. Contributor guidelines:
      https://github.com/apache/incubator-uniffle/blob/master/CONTRIBUTING.md
   3. If the PR is unfinished, please mark this PR as draft.
   -->
   
   ### What changes were proposed in this pull request?
   
   Add partitionIds and shuffleId to `RequireBufferRequest`.
   
   ### Why are the changes needed?
   
   Without this changes, server cannot check limitHugePartition.
   
   ```java
     public long requireBuffer(
         String appId, int shuffleId, List<Integer> partitionIds, int 
requireSize) {
       ShuffleTaskInfo shuffleTaskInfo = shuffleTaskInfos.get(appId);
       if (null == shuffleTaskInfo) {
         LOG.error("No such app is registered. appId: {}, shuffleId: {}", 
appId, shuffleId);
         throw new NoRegisterException("No such app is registered. appId: " + 
appId);
       }
       for (int partitionId : partitionIds) {
         long partitionUsedDataSize = getPartitionDataSize(appId, shuffleId, 
partitionId);
         if (shuffleBufferManager.limitHugePartition(
             appId, shuffleId, partitionId, partitionUsedDataSize)) {
           String errorMessage =
               String.format(
                   "Huge partition is limited to writing. appId: %s, shuffleId: 
%s, partitionIds: %s, partitionUsedDataSize: %s",
                   appId, shuffleId, partitionIds, partitionUsedDataSize);
           LOG.error(errorMessage);
           throw new NoBufferForHugePartitionException(errorMessage);
         }
       }
       return requireBuffer(appId, requireSize);
     }
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Test on local, start a rss cluster with netty, specific a small huge 
partition size, you can see NoBufferForHugePartitionException
   


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