From 2c7119d7c60129fe1a2a4dbffb45653db6a9baff Mon Sep 17 00:00:00 2001 From: hong seokho Date: Mon, 3 Jun 2024 00:01:29 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EB=9D=BD=20=EB=AA=A8=EB=93=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 순차적인 쓰기를 위한 락 모드 변경 (읽기락 -> 쓰기락) --- .../repository/friend_invite/FriendInviteRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/friend_invite/FriendInviteRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/friend_invite/FriendInviteRepository.java index e37380046..18f7bcabe 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/friend_invite/FriendInviteRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/friend_invite/FriendInviteRepository.java @@ -18,7 +18,7 @@ public interface FriendInviteRepository extends Repository, void delete(FriendInvite friendInvite); - @Lock(LockModeType.READ) + @Lock(LockModeType.PESSIMISTIC_WRITE) @QueryHints({@QueryHint(name = "jakarta.persistence.lock.timeout", value = "3000")}) Optional findFriendSendingInviteForUpdateByOwnerIdAndFriendId(Long memberId, Long friendId); @@ -30,7 +30,7 @@ Optional findFriendSendingInviteForUpdateByOwnerIdAndFriendId(Long join fetch fi.friend where fi.owner.id =:friendId and fi.friend.id =:memberId """) - @Lock(LockModeType.READ) + @Lock(LockModeType.PESSIMISTIC_WRITE) @QueryHints({@QueryHint(name = "jakarta.persistence.lock.timeout", value = "3000")}) Optional findFriendReceptionInviteForUpdateByOwnerIdAndFriendId( @Param(value = "memberId") Long memberId,