diff --git a/backend/techpick-api/src/main/java/techpick/api/infrastructure/lock/MysqlLockProvider.java b/backend/techpick-api/src/main/java/techpick/api/infrastructure/lock/MysqlLockProvider.java index bb06f5a13..ecde19626 100644 --- a/backend/techpick-api/src/main/java/techpick/api/infrastructure/lock/MysqlLockProvider.java +++ b/backend/techpick-api/src/main/java/techpick/api/infrastructure/lock/MysqlLockProvider.java @@ -32,7 +32,7 @@ public boolean acquireLock(String key, long timeout, Long userId) { @Override public void releaseLock(String key, Long userId) { String sql = "SELECT RELEASE_LOCK(?)"; - String lockKey = key + "_" + userId; + String lockKey = userId + ""; Boolean result = jdbcTemplate.queryForObject(sql, Boolean.class, lockKey); if (!Boolean.TRUE.equals(result)) { throw new LockException("락 해제 실패 : " + lockKey); diff --git a/backend/techpick-api/src/main/java/techpick/api/infrastructure/lock/util/LoginUserIdDistributedLockAspect.java b/backend/techpick-api/src/main/java/techpick/api/infrastructure/lock/util/LoginUserIdDistributedLockAspect.java index ed9141a53..0908d1af9 100644 --- a/backend/techpick-api/src/main/java/techpick/api/infrastructure/lock/util/LoginUserIdDistributedLockAspect.java +++ b/backend/techpick-api/src/main/java/techpick/api/infrastructure/lock/util/LoginUserIdDistributedLockAspect.java @@ -31,7 +31,7 @@ public Object handleDistributedLock(ProceedingJoinPoint joinPoint, boolean lockCheck = lockProvider.acquireLock(key, timeout, userId); if (!lockCheck) { - throw new LockException("락 설정 실패 : " + key); + throw new LockException("락 설정 실패 : " + userId); } try {