-
Notifications
You must be signed in to change notification settings - Fork 0
[DP-516] 기술블로그 검색어 조회시 score 누락 이슈 수정 #190
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
ssosee
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.
고생하셨습니다!
이전 PR review 에서 codex가 발견했는데, 무슨 말인지 잘 이해가 안가서 넘겼던것 같아요.
|
@codex 한국어로 리뷰 부탁해! |
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.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| private Predicate getCursorConditionForKeywordSearch(TechArticleSort techArticleSort, Long techArticleId, | ||
| Float score, NumberTemplate<Double> totalScore) { | ||
| if (ObjectUtils.isEmpty(techArticleId) || ObjectUtils.isEmpty(score)) { | ||
| Double score, NumberTemplate<Double> totalScore) { | ||
| if (ObjectUtils.isEmpty(techArticleId)) { | ||
| return null; | ||
| } | ||
|
|
||
| // HIGHEST_SCORE(정확도순)인 경우 스코어 기반 커서 사용 | ||
| if (techArticleSort == TechArticleSort.HIGHEST_SCORE) { | ||
| if (techArticleSort == TechArticleSort.HIGHEST_SCORE || ObjectUtils.isEmpty(techArticleSort)) { | ||
| return totalScore.lt(score.doubleValue()) | ||
| .or(totalScore.eq(score.doubleValue()) |
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.
[P1] score 누락 시 커서 조건에서 null 처리 추가
키워드 조회 커서 조건 생성 로직이 techArticleSort가 정확도순(또는 null)일 때 score.doubleValue()를 바로 호출하도록 변경되었습니다. 기존에는 score가 없으면 조건 자체를 생성하지 않아도 요청이 성공했지만, 이제 다음 페이지 요청이 techArticleId만 포함하고 score는 누락된 경우(이전 클라이언트나 잘못된 호출) NullPointerException이 발생해 500 응답이 내려갑니다. score 값이 필수라면 컨트롤러에서 명시적으로 검증하거나 이 메서드에서 null을 허용하도록 기존의 방어 로직을 유지해야 합니다.
Useful? React with 👍 / 👎.
📝 작업 내용
🔗 참고할만한 자료(선택)
💬 리뷰 요구사항(선택)