Summary#
저장된 이터레이터 상태는 손상되거나 조작될 수 있으므로, 복원에 성공했다는 이유만으로 안전한 인덱스라고 가정하면 안 된다. 파일 목록을 참조하기 전에 현재 목록 크기를 기준으로 범위를 검사하고, 복원 직후와 다음 읽기 경로를 모두 테스트한다.
Problem#
범위를 벗어난 파일 인덱스가 체크포인트에서 복원되면 즉시 또는 다음 읽기에서 벡터를 잘못 참조할 수 있다.
Solution#
복원된 인덱스를 파일 목록 길이와 대조해 유효하지 않은 상태를 거부하고, 현재 위치별 접근 경로에 대한 회귀 테스트를 추가한다.
Failure Modes#
- 목록 크기와 같은 값만 검사해 더 큰 값이나 음수 변환값을 놓침
- 복원 시점만 보호하고 지연된 읽기 경로는 방치함
Sources#
- https://github.com/tensorflow/tensorflow/pull/129311
- https://github.com/tensorflow/tensorflow/pull/129324
- https://github.com/tensorflow/tensorflow/pull/129323
- https://github.com/tensorflow/tensorflow/pull/129265
- https://github.com/tensorflow/tensorflow/pull/129303
- https://github.com/tensorflow/tensorflow/pull/129250
- https://github.com/tensorflow/tensorflow/pull/129132
- https://github.com/tensorflow/tensorflow/pull/129301
- https://github.com/tensorflow/tensorflow/pull/129145
- https://github.com/tensorflow/tensorflow/pull/129144
- https://github.com/tensorflow/tensorflow/pull/116690
- https://github.com/huggingface/transformers/pull/49782
- https://github.com/huggingface/transformers/pull/49795
- https://github.com/huggingface/transformers/pull/49668
- https://github.com/huggingface/transformers/pull/49589
- https://github.com/huggingface/transformers/pull/49588
- https://github.com/huggingface/transformers/pull/49792
- https://github.com/huggingface/transformers/pull/49670
- https://github.com/huggingface/transformers/pull/49577
- https://github.com/huggingface/transformers/pull/49785
- https://github.com/ClickHouse/ClickHouse/pull/126741
- https://github.com/ClickHouse/ClickHouse/pull/126313
- https://github.com/ClickHouse/ClickHouse/pull/125467
- https://github.com/ClickHouse/ClickHouse/pull/125401
- https://github.com/ClickHouse/ClickHouse/pull/126967
- https://github.com/ClickHouse/ClickHouse/pull/126579
- https://github.com/ClickHouse/ClickHouse/pull/126228
- https://github.com/ClickHouse/ClickHouse/pull/120407
- https://github.com/ClickHouse/ClickHouse/pull/126961
- https://github.com/ClickHouse/ClickHouse/pull/126710
- https://github.com/ClickHouse/ClickHouse/pull/126863
- https://github.com/rustfs/rustfs/pull/8738
- https://github.com/rustfs/rustfs/pull/8737
- https://github.com/rustfs/rustfs/pull/8735
- https://github.com/rustfs/rustfs/pull/8736
- https://github.com/rustfs/rustfs/pull/8732
- https://github.com/rustfs/rustfs/pull/8730
- https://github.com/rustfs/rustfs/pull/8723
- https://github.com/rustfs/rustfs/pull/8724
- https://github.com/rustfs/rustfs/pull/8706
- https://github.com/rustfs/rustfs/pull/8615
- https://github.com/rustfs/rustfs/pull/8722
- https://github.com/rustfs/rustfs/pull/8715
- https://github.com/rustfs/rustfs/pull/8721
- https://github.com/rustfs/rustfs/pull/8719
- https://github.com/rustfs/rustfs/pull/8710
- mined_at: 2026-10-20T16:50:52Z
Sagwan Revalidation 2026-10-20T17:10:39Z#
- verdict:
ok - note: 복원 인덱스의 범위 검사와 지연된 읽기 경로 테스트는 여전히 유효한 권장안이다.