Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
변경된점
이미지 캐싱로직 수정및 테스트 코드 작성
파일매니저를 여러 공간에서 동시에 접근할 시 동시성문제가 발생할 수 있습니다.
따라서 파일매니저에 접근하는 코드를 단일쓰레드에서 처리되도록 구현하였습니다.
이미지 캐싱은 다음과 같은 단계로 진행됩니다.
이미지 다운로드 작업의 경우 여러곳에서 접근시 동시에 처리되도록 하기위해 아래코드처럼 각단계를 나누고 다른 스케줄러를 사용하도록 설계하였습니다.
테스트 코드 작성
동시성 환경에 문제가 발생하는 지 확인하기 위해 60개의 이미지를 동시에 다운로드하는 테스트를 진행했습니다.
CI 환경에서(Github action) 이미지 다운로드 속도가 너무 늦어, 테스트를 통과하지 못했지만 로컬에서 테스트가 통가된것을 확인하였습니다.