-
Notifications
You must be signed in to change notification settings - Fork 3
채널 UnSubscribe 및 DisConnect 시 Last Read Message ID 저장 #231
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
Conversation
- 모든 인덱스 생성이 자동으로 백그라운드에서 수행
- `allow-bean-definition-overriding: true`은 JpaRepository와 MongoRepository 충돌로 인한 코드 추가
✅ Deploy Preview for jootalkpia canceled.
|
bo-ram-bo-ram
left a comment
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.
고생하셨습니다! update를 통한 성능 개선 굿 떰업
| handleStompCommand(StompHeaderAccessor.wrap(message)); | ||
| } | ||
|
|
||
| public void handleChatUnsubscription(StompHeaderAccessor accessor) { |
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.
해당 메서드 @transactional처리 안해줘도 될까요?
updateChannelFromSession, removeTabFromChannel, updateLastReadId 3개의 변경이 발생되고 있어서요!
하나라도 실패해도 될까요?
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.
현재 Redis 트랜잭션, 보상 트랜잭션 등 다양한 방안을 검토 중입니다!
추후에 리팩토링하겠습니다!
| String sql = "UPDATE user_channel SET last_read_id = ? " + | ||
| "WHERE user_id = ? AND channel_id = ?"; | ||
|
|
||
| jdbcTemplate.update(sql, lastReadId, Long.valueOf(userId), Long.valueOf(channelId)); |
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.
updateLastReadId가 실행될 때 해당 row가 DB에 존재하는지 보장되지 않아서 존재하지 않으면 아무 일도 안 일어날텐데 예외처리까지는 너무 과할까요?
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.
Optional 추가했고 없을 시 Default 값으로 0L 등록 로직 구현 완료했습니다!
Pull request
Related issue
Motivation and context
handleUserDisconnection내handleChatUnsubscriptionmethod 추가Solution
How has this been tested
Types of changes
Checklist