rickyma commented on code in PR #1889:
URL:
https://github.com/apache/incubator-uniffle/pull/1889#discussion_r1675047700
##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -482,6 +495,15 @@ public void updateCachedBlockIds(
if (shuffleBufferManager.isHugePartition(partitionSize)) {
shuffleTaskInfo.markHugePartition(shuffleId, partitionId);
}
+ if (shuffleBufferManager.isPartitionExceededMaxSize(partitionSize)) {
+ throw new ExceedPartitionSizeLimitException(
+ "Current partition size: "
+ + partitionSize
+ + " exceeded the max size: "
+ + shuffleBufferManager.getPartitionMaxSize()
+ + " after cache this shuffle data with size: "
Review Comment:
after cache
->
after caching
##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -308,6 +309,18 @@ protected static int getMaxConcurrencyWriting(
public StatusCode cacheShuffleData(
String appId, int shuffleId, boolean isPreAllocated,
ShufflePartitionedData spd) {
refreshAppId(appId);
+ long partitionSize = getPartitionDataSize(appId, shuffleId,
spd.getPartitionId());
+ long deltaSize = spd.getTotalBlockSize();
+ partitionSize += deltaSize;
+ if (shuffleBufferManager.isPartitionExceededMaxSize(partitionSize)) {
+ throw new ExceedPartitionSizeLimitException(
+ "Current partition size: "
+ + partitionSize
+ + " exceeded the max size: "
+ + shuffleBufferManager.getPartitionMaxSize()
+ + " if cache this shuffle data with size: "
Review Comment:
`before caching` will be better?
Because the other part of the code happens to be `after caching`.
##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -308,6 +309,18 @@ protected static int getMaxConcurrencyWriting(
public StatusCode cacheShuffleData(
String appId, int shuffleId, boolean isPreAllocated,
ShufflePartitionedData spd) {
refreshAppId(appId);
+ long partitionSize = getPartitionDataSize(appId, shuffleId,
spd.getPartitionId());
+ long deltaSize = spd.getTotalBlockSize();
+ partitionSize += deltaSize;
+ if (shuffleBufferManager.isPartitionExceededMaxSize(partitionSize)) {
Review Comment:
Better:
isPartitionExceededMaxSize
->
hasPartitionExceededMaxSize
--
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]