1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +02:00
immich/server
Michael Manganiello e262298090
fix(server): Split database queries based on PostgreSQL bound params limit (#6034)
* fix(server): Split database queries based on PostgreSQL bound params limit

PostgreSQL uses a 16-bit integer to indicate the number of bound
parameters.

This means that the maximum number of parameters for any query is 65535.
Any query that tries to bind more than that (e.g. searching by a list of
IDs) requires splitting the query into multiple chunks.

This change includes refactoring every Repository that runs queries
using a list of ids, and either flattening or merging results.

Fixes #5788, #5997.

Also, potentially a fix for #4648 (at least based on
[this comment](https://github.com/immich-app/immich/issues/4648#issuecomment-1826134027)).

References:

* https://github.com/typeorm/typeorm/issues/7565
* [PostgreSQL message format - Bind](https://www.postgresql.org/docs/15/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-BIND)

* misc: Create Chunked decorator to simplify implementation

* feat: Add ChunkedArray/ChunkedSet decorators
2024-01-06 20:36:12 -05:00
..
bin chore(server): faster shutdown (#5577) 2023-12-08 21:58:07 -05:00
openapi-generator fix(mobile): map markers not loading with int coordinates (#3957) 2023-09-05 06:08:43 +07:00
resources feat: postgres reverse geocoding (#5301) 2023-11-25 18:53:30 +00:00
src fix(server): Split database queries based on PostgreSQL bound params limit (#6034) 2024-01-06 20:36:12 -05:00
test feat(server): in upload folder, split the files into folders based on the first four of the files uuid (#6175) 2024-01-04 14:45:16 -06:00
.eslintrc.js chore(server): curly braces (#5361) 2023-11-28 15:09:20 -05:00
.gitignore feat(web): re-add open graph tags for public share links (#5635) 2023-12-11 13:37:47 -06:00
.prettierignore chore(docs): contributing (#1311) 2023-01-12 08:44:11 -06:00
.prettierrc fix(server): lint import order (#3974) 2023-09-04 21:45:59 +02:00
Dockerfile feat(server): add rw2 support (#6231) 2024-01-06 23:58:04 +00:00
immich-openapi-specs.json feat(web): onboarding (#6066) 2024-01-04 05:28:32 +00:00
nest-cli.json refactor(server)*: tsconfigs (#2689) 2023-06-08 10:01:07 -05:00
openapitools.json chore(server): update openapi (#2205) 2023-04-08 21:26:09 -05:00
package-lock.json fix(deps): update server (#6119) 2024-01-03 17:41:30 -05:00
package.json fix(deps): update dependency @nestjs/schedule to v4 (#5348) 2024-01-01 22:25:25 -05:00
start-microservices.sh fix: shebangs (#3643) 2023-08-16 22:50:01 -05:00
start-server.sh fix: shebangs (#3643) 2023-08-16 22:50:01 -05:00
start.sh fix(server): immich command (#5408) 2023-11-30 14:59:47 -06:00
tsconfig.build.json fix: exclude e2e format (#3250) 2023-07-13 21:41:16 -05:00
tsconfig.json fix(server): better fix for the OAuth Discovery errors (#4695) 2023-10-30 13:22:30 -04:00