Skip to content

Commit

Permalink
Fixed a bug in local cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
jieguangzhou authored and blythed committed Jun 19, 2024
1 parent 30f82cd commit 235feba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix ibis cdc
- Fixed 'objectmodel' and 'predict_one' in doc.


## [0.1.1](https://github.com/SuperDuperDB/superduperdb/compare/0.0.20...0.1.0]) (2023-Feb-09)

#### Changed defaults / behaviours
Expand Down
11 changes: 9 additions & 2 deletions superduperdb/backends/base/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import typing as t
from abc import ABC, abstractmethod

from superduperdb import logging
from superduperdb.base.constant import KEY_BLOBS, KEY_FILES


Expand Down Expand Up @@ -135,15 +136,21 @@ def delete_artifact(self, r: t.Dict):
)

for blob in blobs:
self._delete_bytes(blob.split(':')[-1])
try:
self._delete_bytes(blob.split(':')[-1])
except FileNotFoundError:
logging.warn(f'Blob {blob} not found in artifact store')

# find all files with `&:file:` prefix
files = recursive_find(
r, lambda v: isinstance(v, str) and v.startswith('&:file:')
)
for file_path in files:
# file: &:file:file_name/file_id
self._delete_bytes(file_path.split(':')[-1])
try:
self._delete_bytes(file_path.split(':')[-1])
except FileNotFoundError:
logging.warn(f'File {file_path} not found in artifact store')

@abstractmethod
def get_bytes(self, file_id: str) -> bytes:
Expand Down

0 comments on commit 235feba

Please sign in to comment.