-
Notifications
You must be signed in to change notification settings - Fork 0
[WTH-415] 파일 삭제 구현 #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
The head ref may contain hidden characters: "feat/WTH-415-\uD30C\uC77C-\uC0AD\uC81C-\uAD6C\uD604"
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c86c15c
refactor: 파일 엔티티 수정
soo0711 73a9f8a
feat: 파일 조회 제외 조건 추가
soo0711 e85c62b
feat: 게시글/댓글/영수증 파일 삭제 예약
soo0711 f8a2d13
refactor: 파일 삭제 예약과 즉시 정리 대상 분리
soo0711 5aa3d9e
feat: 탈퇴 시 작성 파일 삭제 예약
soo0711 78760a4
feat: 위드 탈퇴 시 프로필 파일 삭제 예약
soo0711 1c83c43
refactor: 위드 탈퇴 삭제 예약 일괄 처리
soo0711 b6caa27
test: 관련 테스트 추가
soo0711 ab0c536
fix: 프로필 변경 동시성 문제 해결
soo0711 c2cccc1
refactor: 파일 삭제 예약 bulk update로 최적화
soo0711 176fdc2
refactor: 파일 삭제 쿼리 정리
soo0711 2854991
refactor: 코드 가독성 개선
soo0711 9c24a45
refactor: 주석 정리
soo0711 02268e8
fix: 비활성 게시글 좋아요 삭제 처리
soo0711 1e2b7aa
fix: 파일 삭제 상태 갱신
soo0711 8fdccc3
Merge remote-tracking branch 'origin' into feat/WTH-415-파일-삭제-구현
soo0711 54a809b
refactor: 하드 딜리트로 수정
soo0711 31bdf34
fix: 파일 교체 동시성 문제 방지
soo0711 cdfab84
fix: 파일 삭제 오류 방지
soo0711 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
근데 기존에 하드 딜리트를 하던 파트를 소프트 딜리트 + 즉시 정리 대상으로 표시하는 방향으로 수정된 이유가 있을까요??
어차피 즉시 정리 대상으로 처리할 것이라면 하드 딜리트를 해도 문제가 없지 않나 싶어서요!
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분은 DB와 S3 삭제 시점이 분리되어 있어서 소프트 딜리트 + 즉시 정리 대상으로 바꿨습니다!
하드 딜리트를 바로 해버리면 DB row는 삭제됐는데 S3 삭제가 실패하거나 반대로 S3를 먼저 삭제했는데 이후 트랜잭션이 롤백되면서 DB에는 파일 정보가 남아 있는데 S3는 없는 상태가 생길 수 있다고 생각했습니닷
그래서 API 호출 시점에는 hardDeleteAfter = now로 즉시 정리 대상임을 표시한 뒤 클린업 과정에서 S3 삭제 성공 후 하드 딜리트를 처리하는 것이 데이터 정합성 측면에서 더 적절하다고 생각해서 해당 방식으로 수정했습니다!!
이 방향에 대해서는 어떻게 생각하시나용??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
사실 S3 삭제를 진행하고 있진 않긴 해서... 요금이 크게 나오고 있지도 않고.. 음 고민이네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
트래픽이 늘어난다면 S3 비용도 무시 못할 정도가 되긴 할 것 같은데 지금 함께 고려할 단계인지를 고민해봐야할 것 같아요!