rickyma commented on code in PR #1758:
URL:
https://github.com/apache/incubator-uniffle/pull/1758#discussion_r1621913972
##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -413,15 +422,28 @@ public void addFinishedBlockIds(
+ " bitmaps!");
}
+ ShuffleTaskInfo taskInfo = getShuffleTaskInfo(appId);
+ if (taskInfo == null) {
+ throw new InvalidRequestException(
+ "ShuffleTaskInfo is not found that should not happen for appId: " +
appId);
+ }
+ int totalUpdated = 0;
for (Map.Entry<Integer, long[]> entry : partitionToBlockIds.entrySet()) {
Integer partitionId = entry.getKey();
Roaring64NavigableMap bitmap = blockIds[partitionId % bitmapNum];
+ int updated = 0;
synchronized (bitmap) {
for (long blockId : entry.getValue()) {
- bitmap.addLong(blockId);
+ if (!bitmap.contains(blockId)) {
+ bitmap.addLong(blockId);
+ updated++;
Review Comment:
Refer to @jerqi 's suggestion, you may also rename this:
updatedBlockCount
totalUpdatedBlockCount
--
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]