Repository: mars-project/mars

Issue:
[BUG] Mars shuffle AttributeError: 'mars.oscar.core.ActorRef' object has no attribute '_remove_mapper_data'
<!--
Thank you for your contribution!

Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.
-->

**Describe the bug**
When running mars shuffle, mars will invoke `_remove_mapper_data` to clean data, but the call throws `AttributeError: 
 mars.oscar.core.ActorRef' object has no attribute '_remove_mapper_data'`
**To Reproduce**
To help us reproducing this bug, please provide information below:
1. Your Python version:3.8.13
2. The version of Mars you use:master
3. Versions of crucial packages, such as numpy, scipy and pandas
4. Full stack of the error.
```
mars/deploy/oscar/tests/test_local.py:344: in test_execute_describe
    await info
mars/deploy/oscar/session.py:105: in wait
    return await self._aio_task
mars/deploy/oscar/session.py:953: in _run_in_background
    raise task_result.error.with_traceback(task_result.traceback)
mars/services/task/supervisor/processor.py:369: in run
    await self._process_stage_chunk_graph(*stage_args)
mars/services/task/supervisor/processor.py:247: in _process_stage_chunk_graph
    chunk_to_result = await self._executor.execute_subtask_graph(
mars/services/task/execution/mars/executor.py:196: in execute_subtask_graph
    return await stage_processor.run()
mars/services/task/execution/mars/stage.py:231: in run
    return await self._run()
mars/services/task/execution/mars/stage.py:251: in _run
    raise self.result.error.with_traceback(self.result.traceback)
mars/services/scheduling/worker/execution.py:396: in internal_run_subtask
    await self.ref()._remove_mapper_data.tell(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   return object.__getattribute__(self, item)
E   AttributeError: 'mars.oscar.core.ActorRef' object has no attribute '_remove_mapper_data'

mars/oscar/core.pyx:123: AttributeError

```
5. Minimized code to reproduce the error.
`pytest -v -s  mars/deploy/oscar/tests/test_local.py::test_execute_describe`
**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.



Discussion:

Resolving patch:
diff --git a/mars/services/scheduling/worker/execution.py b/mars/services/scheduling/worker/execution.py
--- a/mars/services/scheduling/worker/execution.py
+++ b/mars/services/scheduling/worker/execution.py
@@ -344,7 +344,7 @@ def _check_cancelling(cls, subtask_info: SubtaskExecutionInfo):
         if subtask_info.cancelling:
             raise asyncio.CancelledError
 
-    async def _remove_mapper_data(
+    async def remove_mapper_data(
         self, session_id: str, band_name: str, remote_mapper_keys: List
     ):
         storage_api = await StorageAPI.create(
@@ -393,7 +393,7 @@ async def internal_run_subtask(self, subtask: Subtask, band_name: str):
                 subtask, band_name, subtask_api, batch_quota_req
             )
             if remote_mapper_keys:
-                await self.ref()._remove_mapper_data.tell(
+                await self.ref().remove_mapper_data.tell(
                     subtask.session_id, band_name, remote_mapper_keys
                 )
         except:  # noqa: E722  # pylint: disable=bare-except


Test patch: