Skip to content

Commit

Permalink
[CELEBORN] Avoid CelebornShuffleManager#getWriter adding shuffle id r…
Browse files Browse the repository at this point in the history
…epeatedly to columnarShuffleIds (#6281)
  • Loading branch information
SteNicholas authored Jul 1, 2024
1 parent d516f56 commit f80c068
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,8 @@ public <K, V, C> ShuffleHandle registerShuffle(

@Override
public boolean unregisterShuffle(int shuffleId) {
if (columnarShuffleIds.contains(shuffleId)) {
if (columnarShuffleManager().unregisterShuffle(shuffleId)) {
return columnarShuffleIds.remove(shuffleId);
} else {
return false;
}
if (columnarShuffleIds.remove(shuffleId)) {
return columnarShuffleManager().unregisterShuffle(shuffleId);
}
return CelebornUtils.unregisterShuffle(
lifecycleManager,
Expand Down Expand Up @@ -311,7 +307,6 @@ public <K, V> ShuffleWriter<K, V> getWriter(
return vanillaCelebornShuffleManager().getWriter(handle, mapId, context, metrics);
}
} else {
columnarShuffleIds.add(handle.shuffleId());
return columnarShuffleManager().getWriter(handle, mapId, context, metrics);
}
} catch (Exception e) {
Expand Down

0 comments on commit f80c068

Please sign in to comment.