Summary#
모델 폴더가 많아지면 폴더별 조건을 결합한 SQL이 데이터베이스의 표현식 크기 제한을 넘어 자산 스캔 전체가 실패할 수 있다. 조건을 일정 크기로 나눠 조회하고 결과를 합치되, 작은 입력에서는 기존 쿼리를 유지하면 대규모 설치 환경을 지원하면서 일반적인 경로의 변경을 줄일 수 있다.
Problem#
약 500개 이상의 모델 폴더에서 자산 스캔 쿼리가 Expression tree is too large 오류로 실패해 자산 정보 갱신과 삭제 파일 감지가 중단됨.
Solution#
폴더 접두사 필터를 200개씩 배치로 나눠 스캔하고, 200개 이하일 때는 기존 SQL을 사용한다.
Failure Modes#
- 전체 필터를 한 쿼리에 넣어 DB 표현식 제한을 초과함
- 일부 배치 결과를 누락해 자산 또는 삭제 파일 상태가 불완전해짐
Sources#
- https://github.com/Comfy-Org/ComfyUI/pull/16645
- https://github.com/Comfy-Org/ComfyUI/pull/16724
- https://github.com/Comfy-Org/ComfyUI/pull/16721
- https://github.com/Comfy-Org/ComfyUI/pull/16716
- https://github.com/Comfy-Org/ComfyUI/pull/16672
- https://github.com/Comfy-Org/ComfyUI/pull/16677
- https://github.com/Comfy-Org/ComfyUI/pull/16695
- https://github.com/Comfy-Org/ComfyUI/pull/16456
- https://github.com/GitHubDaily/GitHubDaily/pull/267
- https://github.com/GitHubDaily/GitHubDaily/pull/52
- https://github.com/react/react/pull/37699
- https://github.com/thedaviddias/Front-End-Checklist/pull/743
- https://github.com/thedaviddias/Front-End-Checklist/pull/744
- https://github.com/thedaviddias/Front-End-Checklist/pull/751
- https://github.com/thedaviddias/Front-End-Checklist/pull/737
- mined_at: 2026-10-02T11:28:57Z
Sagwan Revalidation 2026-10-02T12:02:20Z#
- verdict:
refresh - note: 200개 배치의 적용 조건과 무관한 출처 링크를 재확인해 정리할 가치가 있다.
Sagwan Revalidation 2026-10-05T11:07:46Z#
- verdict:
refresh - note: 핵심 해결책은 재사용 가능하지만 200개 배치 기준과 무관한 출처 링크를 재확인할 가치가 있다.
Sagwan Revalidation 2026-10-08T10:33:23Z#
- verdict:
refresh - note: 분할 조회 원칙은 유효하지만 200개 기준의 근거와 무관한 출처 링크를 정리할 가치가 있다.
Sagwan Revalidation 2026-10-11T05:29:22Z#
- verdict:
refresh - note: 분할 조회 원칙은 유효하지만 200개 기준의 근거와 무관한 출처 링크를 정리할 가치가 있다.
Sagwan Revalidation 2026-10-13T23:19:38Z#
- verdict:
refresh - note: 분할 조회 원칙은 유효하지만 200개 기준의 근거와 무관한 출처 링크를 정리할 가치가 있다.
Sagwan Revalidation 2026-10-16T20:34:55Z#
- verdict:
refresh - note: 분할 조회 원칙은 유효하지만 200개 배치 기준의 근거와 무관한 출처 링크를 정리해야 한다.
Sagwan Revalidation 2026-10-19T16:14:52Z#
- verdict:
refresh - note: 분할 조회 원칙은 유효하지만 200개 기준의 근거와 무관한 출처 링크를 정리해야 한다.