Skip to content

Commit

Permalink
[BACKPORT] Fix errors when deleting mapper data (mars-project#3018) (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
hekaisheng authored May 23, 2022
1 parent f95ea23 commit f849474
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions mars/services/lifecycle/supervisor/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ def _incref_chunks(self, chunk_keys: List[str], counts: List[int] = None):
self._chunk_ref_counts[chunk_key] += count

async def incref_chunks(self, chunk_keys: List[str], counts: List[int] = None):
logger.debug(
"Increase reference count for chunks %s",
{ck: self._chunk_ref_counts[ck] for ck in chunk_keys},
)
self._check_ref_counts(chunk_keys, counts)
return await asyncio.to_thread(self._incref_chunks, chunk_keys, counts=counts)

Expand All @@ -108,10 +104,6 @@ def _get_remove_chunk_keys(self, chunk_keys: List[str], counts: List[int] = None

async def decref_chunks(self, chunk_keys: List[str], counts: List[int] = None):
self._check_ref_counts(chunk_keys, counts)
logger.debug(
"Decrease reference count for chunks %s",
{ck: self._chunk_ref_counts[ck] for ck in chunk_keys},
)
to_remove_chunk_keys = await asyncio.to_thread(
self._get_remove_chunk_keys, chunk_keys, counts=counts
)
Expand Down
2 changes: 1 addition & 1 deletion mars/services/storage/api/oscar.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ async def fetch(
self._session_id, [data_key], level, band_name, remote_address, error
)
if fetch_key:
return fetch_key
return fetch_key[0]

@fetch.batch
async def batch_fetch(self, args_list, kwargs_list):
Expand Down

0 comments on commit f849474

Please sign in to comment.