Skip to content

Conversation

@nayonsoso
Copy link
Collaborator

@nayonsoso nayonsoso commented Jan 22, 2025

관련 이슈

문제 상황

대학 추천 로직이 허술했습니다...
기존 추천 로직은 이렇게 구현되어있습니다.

  • 로그인한 사용자의 경우 대학 추천
    • 회원가입 시 선택한 관심 지역과 관심 국가에 해당하는 대학 중, 이번 term 에 열리는 학교들을 불러온다.
    • 불러온 '맞춤 추천 대학교'의 순서를 무작위로 섞는다.
    • '맞춤 추천 대학교'의 수가 6개보다 적다면, '공통 추천 대학교' 중에서 이번 term 에 열리는 학교들을 부족한 수 만큼 불러온다.
  • 로그인하지 않은 사용자의 경우
    • '공통 추천 대학교' 중에서 이번 term 에 열리는 학교들을 6개 불러온다.

그런데 놀랍게도, 기존의 GeneralRecommendUniversities 클래스에서 선언해둔 18개 학교와
2025-1-a 에 열린 37개의 학교들이 단 하나도 일치하지 않아서
'공통 추천 대학교' 중에서 이번 term 에 열리는 학교들이 0개가 되는 상황이 발생했습니다.. 💀

그 결과, 로그인 하지 않은 사용자가 호출하면 빈 배열이 반환되었고
로그인한 사용자가 호출하니 사이즈가 6보다 작은 배열에 대해 subList 해서 out of bound 예외가 발생했습니다.

해결한 방법

2025-1-a 에 열린 대학 중 6개를 추천 대학 후보에 추가해서 해결했습니다.
아주 임시방편입니다 ㅠ.ㅜ
더 근본적으로 이를 해결하기 위해서, 대학 추천로직을 바꾸는게 좋겠습니다.
디스커션 파뒀습니다~ #160

특이사항

이 PR은 hot fix이므로 main과 release에 각각 머지합니다!

리뷰 요구사항 (선택)

디스커션에 의견 남겨주세요🥹

@nayonsoso nayonsoso added the 버그 Something isn't working label Jan 22, 2025
@nayonsoso nayonsoso self-assigned this Jan 22, 2025
Copy link
Contributor

@Gyuhyeok99 Gyuhyeok99 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
Member

@wibaek wibaek left a comment

Choose a reason for hiding this comment

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

확인했습니다.

@nayonsoso nayonsoso merged commit d4e57c0 into main Jan 27, 2025
@nayonsoso nayonsoso deleted the hotfix/158-handle-recommendation-lack-case branch February 15, 2025 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

버그 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/university/recommends 에서 결과가 없거나 500 오류 발생

4 participants