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.
구현 요약
원래 시험 하나 당 한 번의 제출만 할 수 있었다.
IsSingleAttempt 컬럼을 추가하고, 제출 시 시험 조건에 따라 분기 처리 했다.
한 번의 제출만 가능할 경우 분산 락을 이용해서 동시 제출을 막았다.
참고로, 같은 클래스에서 트랜잭션 메서드를 사용할 수 없어서 SubmissionLockService로 분리해 적용했다.
연관 이슈