Skip to content

Commit

Permalink
[data] Remove workaround for ray-project#39151 (ray-project#43757)
Browse files Browse the repository at this point in the history
Removes the workaround for ray-project#39151. The workaround hides a Ray Core ref counting bug by keeping old refs around. However, this can cause memory leaks.

---------

Signed-off-by: Stephanie Wang <[email protected]>
  • Loading branch information
stephanie-wang committed Mar 8, 2024
1 parent e9ccb59 commit f178d1a
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ def __init__(
self._metadata_tasks: Dict[int, MetadataOpTask] = {}
self._next_metadata_task_idx = 0
# Keep track of all finished streaming generators.
# TODO(hchen): This is a workaround for a bug of lineage reconstruction.
# When the streaming generator ref is GC'ed, the objects it generated
# cannot be reconstructed. Should remove it once Ray Core fixes the bug.
self._finished_streaming_gens: List[ObjectRefGenerator] = []
super().__init__(name, input_op, target_max_block_size)

# If set, then all output blocks will be split into
Expand Down Expand Up @@ -316,8 +312,7 @@ def _task_done_callback(task_index: int, exception: Optional[Exception]):
/ self._metrics.num_tasks_finished
)

task = self._data_tasks.pop(task_index)
self._finished_streaming_gens.append(task.get_waitable())
self._data_tasks.pop(task_index)
# Notify output queue that this task is complete.
self._output_queue.notify_task_completed(task_index)
if task_done_callback:
Expand Down Expand Up @@ -385,7 +380,6 @@ def get_map_transformer(self) -> MapTransformer:
def shutdown(self):
self._data_tasks.clear()
self._metadata_tasks.clear()
self._finished_streaming_gens.clear()

@abstractmethod
def current_processor_usage(self) -> ExecutionResources:
Expand Down

0 comments on commit f178d1a

Please sign in to comment.