CLI batch upload stats

I noticed that whenever I upload the same directory multiple times using the CLI tool, it always gives me a non-zero diff on subsequent runs. For example:

Indexing local assets...
Indexing complete, found 4005 local assets
Comparing local assets with those on the Immich instance...
A total of 493 assets will be uploaded to the server


But then the upload progresses very quickly and the total asset count reported by the server doesn't change, leading me to believe that either certain uploads fail OR they all succeed but the reported diff is wrong.

postgres logs indicate the latter explanation:

 ERROR:  duplicate key value violates unique constraint "UQ_assets_owner_library_checksum"    
 DETAIL:  Key ("ownerId", "libraryId", checksum)=(2f1c0a42-4c8e-4e16-83ac-bbe0e9ec0512, 68468024-d316-4b4f-a62f-5c2a9916ca52, \x5a97033efd6540ea5fff64f2fa280f7733b5b793 already exists.


But then again, I'm not sure if these logs originate from the 493 assets or from the (4005-493) which are already on the server.

Does anyone have a better understanding of this? Thanks!
Was this page helpful?