-
Notifications
You must be signed in to change notification settings - Fork 950
Open
Description
The images remain in the img
table after deleting the parent subject or service.
Steps to reproduce the behavior:
- docker exec -ti bash
- psql -U postgres
- \c frs
- Use the web interface (API) to create a service, subject (type == recognition, name == UNIQUE_SUBJECT_NAME) and upload an image.
- select i.id img_id, m.app_id app_id, s.id subject_id, m.id model_id, e.id embeggin_id from img i join embedding e on i.id = e.img_id join subject s on s.id = e.subject_id join model m on m.api_key = s.api_key where s.subject_name = 'UNIQUE_SUBJECT_NAME';
- Remember img_id.
- Delete the subject via the web-UI (API).
- select count(id) from img where id='<img_id from the step 6>'; (the result is 1 but this image is not used anymore).
Images are deleted from the "img" table only when images (not parent entities) are directly deleted via the web interface.
Versions:
ADMIN_VERSION=1.2.0
API_VERSION=1.2.0
FE_VERSION=1.2.0
CORE_VERSION=1.2.0-arcface-r100
POSTGRES_VERSION=1.2.0
To get all such images: select count(i.id) from img i left join embedding e on e.img_id = i.id where e.id is null
To clean up: delete from img where id in (select i.id from img i left join embedding e on e.img_id = i.id where e.id is null)
.
Metadata
Metadata
Assignees
Labels
No labels