Skip to content

Commit

Permalink
hotfix: 락 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
sangwonsheep committed Dec 12, 2024
1 parent 435dbc1 commit 130d597
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 130d597

Please sign in to comment.