smallzhongfeng commented on code in PR #158:
URL: https://github.com/apache/incubator-uniffle/pull/158#discussion_r946304571
##########
server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java:
##########
@@ -250,11 +242,8 @@ public void updateCachedBlockIds(String appId, int
shuffleId, ShufflePartitioned
}
public Roaring64NavigableMap getCachedBlockIds(String appId, int shuffleId) {
- Map<Integer, Roaring64NavigableMap> shuffleIdToBlockIds =
cachedBlockIds.get(appId);
- if (shuffleIdToBlockIds == null) {
- LOG.warn("Unexpected value when getCachedBlockIds for appId[" + appId +
"]");
- return Roaring64NavigableMap.bitmapOf();
- }
+ Map<Integer, Roaring64NavigableMap> shuffleIdToBlockIds = shuffleTaskInfo
Review Comment:
```
if (!shuffleToCachedBlockIds.isEmpty()) {
storageManager.removeResources(appId, shuffleToCachedBlockIds.keySet());
}
shuffleTaskInfo.remove(appId);
```
In here, it will remove task info because of expired. If
`shuffleIdToBlockIds` don't have this app, it will create a new
`ShuffleTaskInfo`, and `getCachedBlockIds` will return a `ConcurrentHashMap`.
Null should not be returned.
--
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]