Skip to content
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

[Feat] 알림 목록 조회 / 알림 읽음 처리 기능 개발 #282

Merged
merged 5 commits into from
Apr 9, 2023

Conversation

Youhoseong
Copy link
Collaborator

@Youhoseong Youhoseong commented Apr 9, 2023

관련 Issue

작업 내용

  1. 알림 페이지네이션
  • 댓글,답글,타이틀,반응만 대응
  • 추후 개발 추가 예정
  1. 알림 읽음처리

테스트 안해봄 ㅎ

Next TODO: 알림 생성

Figma

image

@Youhoseong Youhoseong requested a review from heoboseong7 April 9, 2023 10:57
@Youhoseong Youhoseong self-assigned this Apr 9, 2023
@github-actions
Copy link

github-actions bot commented Apr 9, 2023

다시짜 🤖

1 similar comment
@github-actions
Copy link

github-actions bot commented Apr 9, 2023

다시짜 🤖

@github-actions
Copy link

github-actions bot commented Apr 9, 2023

테스트통과 🤖

@Youhoseong Youhoseong requested a review from kimyoungi99 April 9, 2023 11:05
Comment on lines +22 to +24
.where(notification.user.eq(user)
.and(notification.id.lt(cPage.getCursor()))
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

쿼리 속도 향상을 위해서 (user_id, notification_id)로 인덱스 추가가 필요해보에요

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notification id로 인덱스를 탈거라서, 지켜보시죠~

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

지금 상태에선 괜찮아보여요

제가 생각한 내용은
테이블에 (user_id, notification_id)가 아래처럼 있을 때(키위가 잘 돼서 ㅎㅎ;)
(1, 1000)
...
(1, 2000)
...
(1, 3000)

user id = 1, notification id = 3000 요청이 들어오면
notification_id 인덱스를 타더라도 3000부터 1000까지 모든 레코드를 읽어야 하는 문제였어요

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네 의도 이해는 하고 있어요 ㅎㅎ

@github-actions
Copy link

github-actions bot commented Apr 9, 2023

테스트통과 🤖

@Youhoseong Youhoseong requested a review from heoboseong7 April 9, 2023 12:11
@github-actions
Copy link

github-actions bot commented Apr 9, 2023

테스트통과 🤖

Copy link
Collaborator

@heoboseong7 heoboseong7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
고생하셨습니다 ㅎㅎ

@Youhoseong Youhoseong merged commit 2c3b1f3 into main Apr 9, 2023
@Youhoseong Youhoseong deleted the issue-#281 branch April 9, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants