[BUG] assets may become unavailable during storage migration #1443

Closed
opened 2026-02-05 01:49:51 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @uhthomas on GitHub (Oct 11, 2023).

The bug

An operation log for file moves was introduced to help with data consistency issues (#2877) in #4361, but it too has realistic cases which impact data availability.

The move operation works by first moving the file and then changing the path in the database. There are no locks on the asset row during this operation, which presents two problems:

  1. There is a race condition where assets will be unavailable for brief periods during a storage migration.
  2. Assets will be unavailable for extended periods of time if the asset row is not updated. It will eventually fix itself, but availability is impacted until then.

The OS that Immich Server is running on

N/A

Version of Immich Server

v1.82.0

Version of Immich Mobile App

N/A

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

N/A

Additional information

N/A

Originally created by @uhthomas on GitHub (Oct 11, 2023). ### The bug An operation log for file moves was introduced to help with data consistency issues (#2877) in #4361, but it too has realistic cases which impact data availability. The move operation works by first moving the file and then changing the path in the database. There are no locks on the asset row during this operation, which presents two problems: 1. There is a race condition where assets will be unavailable for brief periods during a storage migration. 2. Assets will be unavailable for extended periods of time if the asset row is not updated. It will _eventually_ fix itself, but availability is impacted until then. ### The OS that Immich Server is running on N/A ### Version of Immich Server v1.82.0 ### Version of Immich Mobile App N/A ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML N/A ``` ### Your .env content ```Shell N/A ``` ### Reproduction steps ```bash N/A ``` ### Additional information N/A
Author
Owner

@jrasm91 commented on GitHub (May 13, 2024):

This is a non-issue when the storage template is disabled (and it is off by default now). There are no plans to support this level of availability while the storage migration is enabled.

@jrasm91 commented on GitHub (May 13, 2024): This is a non-issue when the storage template is disabled (and it is off by default now). There are no plans to support this level of availability while the storage migration is enabled.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1443