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

커넥션풀 관련 설정 추가 + 회원탈퇴시 fk 관련 삭제 로직 추가 #784

Merged
merged 7 commits into from
Oct 19, 2023

Conversation

aiaiaiai1
Copy link
Collaborator

🔥 연관 이슈

close: #767

📝 작업 요약

  • 신고 조치 관련 추가 피드백을 반영했습니다. (신고조치알림 관련 기능 구현 #756)
  • 회원탈퇴시 신고조치알림과 공지사항을 삭제하는 로직을 추가하였습니다.
  • 커넥션풀 관련 환경변수 추가하였습니다.

⏰ 소요 시간

30분

🔎 작업 상세 설명

🌟 논의 사항

Q. 이벤트리스너 테스트에서 @disable 을 붙인 이유는 깃허브 액션때문에 추가하신건가요?

@github-actions
Copy link

github-actions bot commented Oct 18, 2023

Test Results

475 tests   474 ✔️  35s ⏱️
153 suites      1 💤
153 files        0

Results for commit f1aa59e.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@tjdtls690 tjdtls690 left a comment

Choose a reason for hiding this comment

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

깔끔하게 잘 구현해주셔서 사소한 것들 몇 가지 리뷰 남겼습니다 :)

Comment on lines 94 to 96
PageRequest pageRequestB = PageRequest.of(1, 10);
List<ReportActionAlarm> reportActionAlarmsB = reportActionAlarmRepository.findByMemberOrderByCreatedAtDesc(
member, pageRequestB);
Copy link
Collaborator

Choose a reason for hiding this comment

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

위와 동일합니다.

Comment on lines 57 to 58
List<ReportActionAlarm> reportActionAlarms = reportActionAlarmRepository.findByMemberOrderByCreatedAtDesc(
member, pageRequest);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
List<ReportActionAlarm> reportActionAlarms = reportActionAlarmRepository.findByMemberOrderByCreatedAtDesc(
member, pageRequest);
List<ReportActionAlarm> reportActionAlarms = reportActionAlarmRepository
.findByMemberOrderByCreatedAtDesc(member, pageRequest);

이렇게 개행 바꾸는 것은 어떨까요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

좋아요 자꾸 자동정렬이 이상하게 되네요

Comment on lines 91 to 92
List<ReportActionAlarm> reportActionAlarmsA = reportActionAlarmRepository.findByMemberOrderByCreatedAtDesc(
member, pageRequestA);
Copy link
Collaborator

Choose a reason for hiding this comment

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

위와 동일합니다.

Comment on lines -97 to +99
.as(new ParameterizedTypeReference<List<ReportActionAlarmResponse>>() {
}.getType());
.as(new TypeRef<>() {
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 👍

Comment on lines +513 to +516
assertAll(
() -> assertThat(memberRepository.findAll()).isEmpty(),
() -> assertThat(reportActionAlarmRepository.findAll()).isEmpty()
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

assertAll 대신 assertSoftly 써보는 것은 어떨까요.
개인적으로 그게 더 친절하게 안내해주더라구요.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

네 수정하도록 할께요~

Copy link
Collaborator

@woo-chang woo-chang left a comment

Choose a reason for hiding this comment

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

안녕하세요 루쿠 ㅎㅎ

늦은 시간까지 고생하셨습니다 👍🏻
몇 가지 작은 코멘트 남겼으니 확인해주시면 감사합니다 :)

@@ -9,8 +9,10 @@

public interface ReportActionAlarmRepository extends JpaRepository<ReportActionAlarm, Long> {

List<ReportActionAlarm> findByMember(final Member member, final Pageable pageable);
List<ReportActionAlarm> findByMemberOrderByCreatedAtDesc(final Member member, final Pageable pageable);
Copy link
Collaborator

Choose a reason for hiding this comment

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

인덱스를 탈 수 있는 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.

무슨말씀인지 잘 이해가 안되요 ㅠ

Copy link
Collaborator

Choose a reason for hiding this comment

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

auto increment 전략을 사용하고 있기에 id순이 생성순과 동일하고, id에는 PK 인덱스가 걸려있지만, createdAt에는 인덱스가 걸려있지 않아 인덱스가 걸려있는 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.

아하 어차피 id로 최신순으로 이미 정렬이 가능하니 id로 가져온다는 말씀이군요! 수정해보겠습니다!

reportActionAlarmRepository.deleteAllById(reportActionAlarmIds);
}

private void deleteNotices(final Member member) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

공지사항까지 챙겨주셔서 감사합니다 👍🏻

Comment on lines +7 to +10
hikari:
maximumPoolSize: ${MAXIMUM_POOL_SIZE}
connectionTimeout: ${CONNECTION_TIMEOUT}
maxLifetime: ${MAX_LIFETIME}
Copy link
Collaborator

Choose a reason for hiding this comment

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

이외의 설정도 많았던 것 같은데 3개의 설정만 해주시는 이유가 있나요?!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

그 이외의 설정값들은 default값이여서 따로 설정은 하지 않았습니다!

Copy link
Collaborator

@jeomxon jeomxon left a comment

Choose a reason for hiding this comment

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

다른 분들께서 리뷰를 잘 남겨주셔서 따로 남길 리뷰가 없네요!
이전에 남겼던 리뷰 반영까지 👍🏻

Copy link
Collaborator

@tjdtls690 tjdtls690 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 루쿠
ㅡ 쿠 ㅡ

Copy link
Collaborator

@woo-chang woo-chang left a comment

Choose a reason for hiding this comment

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

id 관련 코드만 수정하시면 될 것 같아서 미리 approve 할께요 ~

마지막 기능까지 고생하셨습니다 ㅎㅎ 👍

@aiaiaiai1 aiaiaiai1 merged commit 50ea2f8 into dev Oct 19, 2023
3 checks passed
@woo-chang woo-chang deleted the feat/#767 branch October 19, 2023 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

커넥션풀 관련 설정 환경변수 추가
4 participants