Skip to content

bugfix/thumbnails on update#330

Draft
EdouardVanbelle wants to merge 1 commit intoAtalayaLabs:mainfrom
EdouardVanbelle:fix/thumbnail-on-update
Draft

bugfix/thumbnails on update#330
EdouardVanbelle wants to merge 1 commit intoAtalayaLabs:mainfrom
EdouardVanbelle:fix/thumbnail-on-update

Conversation

@EdouardVanbelle
Copy link
Copy Markdown
Contributor

Bug 1 (webdav_handler.rs handle_put() update branch):

  • After a successful file update via WebDAV PUT, if the content type is a supported image: a. delete_thumbnails(file_id) — evicts the stale moka cache entry b. Spawns a background task to read the new blob bytes and call generate_all_sizes_background_from_bytes

Bug 2 (dedup_service.rs):

  • Added thumbnail_service: Option<Arc> field with a with_thumbnail_service() builder
  • In remove_legacy_reference(): calls delete_blob_thumbnails(hash) when ref_count hits 0
  • In remove_manifest_reference(): calls delete_blob_thumbnails(file_hash) when manifest's last ref is dropped
  • Wired in di.rs — the thumbnail service is created before dedup service so the ordering works cleanly

  Bug 1 & 2 (webdav_handler.rs handle_put() update branch):
  - After a successful file update via WebDAV PUT, if the content type is a supported image:
    a. delete_thumbnails(file_id) — evicts the stale moka cache entry
    b. Spawns a background task to read the new blob bytes and call generate_all_sizes_background_from_bytes

  Bug 3 & 4 (dedup_service.rs):
  - Added thumbnail_service: Option<Arc<ThumbnailService>> field with a with_thumbnail_service() builder
  - In remove_legacy_reference(): calls delete_blob_thumbnails(hash) when ref_count hits 0
  - In remove_manifest_reference(): calls delete_blob_thumbnails(file_hash) when manifest's last ref is dropped
  - Wired in di.rs — the thumbnail service is created before dedup service so the ordering works cleanly
@EdouardVanbelle EdouardVanbelle force-pushed the fix/thumbnail-on-update branch from 8ee95f2 to 2c63f5f Compare May 6, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant