Skip to content

Conversation

@toychip
Copy link
Member

@toychip toychip commented Jul 16, 2025

요약(개요)

작업 내용

  • 캐시 찾는 쿼리 수정

집중해서 리뷰해야 하는 부분

기타 전달 사항 및 참고 자료(선택)

Summary by CodeRabbit

  • 버그 수정
    • 태그 추천 캐시 조회 시 사용자 ID 기반으로 동작하도록 개선되어, 캐싱 및 추천 결과의 일관성이 향상되었습니다.
  • 리팩터링
    • 태그 추천 캐시 관련 기능들이 사용자 ID를 기준으로 단순화되어, 내부 동작이 보다 효율적으로 변경되었습니다.
  • 문서화
    • 공개 메서드 시그니처가 변경되어, 관련 개발 문서와 API 사용 가이드가 최신화되었습니다.

@toychip toychip requested a review from mkSpace as a code owner July 16, 2025 10:34
@coderabbitai
Copy link

coderabbitai bot commented Jul 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

이 변경사항은 태그 추천 캐시 로직에서 기존에 UserTags의 JSON 직렬화를 키로 사용하던 방식을 userId를 직접 키로 사용하는 방식으로 전환합니다. 이에 따라 관련 메서드 시그니처와 내부 구현, 리포지토리 쿼리 조건이 모두 userId 기반으로 일관되게 수정되었습니다.

Changes

파일/경로 변경 요약
.../core/domain/recommend/RecommendServiceImpl.kt getTagRecommendCaching 메서드가 UserTags 대신 userId를 파라미터로 받도록 시그니처 및 내부 로직 수정. 관련 호출부도 일괄 변경.
.../core/domain/tag/TagRecommendCacheReader.kt findTodayCache 메서드가 tagsJson 대신 userId만 받도록 시그니처 및 내부 로직 수정. 검색 날짜는 항상 현재 날짜 사용.
.../core/domain/tag/TagRecommendCacheRepository.kt findTodayCache 메서드가 tagsJson 대신 userId를 받고, 파라미터 순서 변경. 시그니처 일치화.
.../db/core/tag/TagRecommendCacheCoreRepository.kt findTodayCacheuserId 기반으로 변경. JPA 쿼리 호출도 userId를 사용하도록 변경.
.../db/core/tag/TagRecommendCacheJpaRepository.kt JPA 메서드가 findByRecommendTypeAndSearchDateAndTagsJson에서 findByUserIdAndSearchDateAndRecommendType로 변경. 파라미터도 userId 기반으로 수정.

Sequence Diagram(s)

sequenceDiagram
    participant Service as RecommendServiceImpl
    participant Reader as TagRecommendCacheReader
    participant Repo as TagRecommendCacheRepository
    participant JPA as TagRecommendCacheJpaRepository

    Service->>Reader: getTagRecommendCaching(recommendType, userId)
    Reader->>Repo: findTodayCache(recommendType, LocalDate.now(), userId)
    Repo->>JPA: findByUserIdAndSearchDateAndRecommendType(userId, LocalDate.now(), recommendType)
    JPA-->>Repo: TagRecommendCacheEntity?
    Repo-->>Reader: TagRecommendCache?
    Reader-->>Service: TagRecommendCache?
Loading

Possibly related PRs


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 547795d and 6078209.

📒 Files selected for processing (5)
  • noweekend-core/core-api/src/main/kotlin/noweekend/core/domain/recommend/RecommendServiceImpl.kt (3 hunks)
  • noweekend-core/core-domain/src/main/kotlin/noweekend/core/domain/tag/TagRecommendCacheReader.kt (1 hunks)
  • noweekend-core/core-domain/src/main/kotlin/noweekend/core/domain/tag/TagRecommendCacheRepository.kt (1 hunks)
  • noweekend-storage/db-core/src/main/kotlin/noweekend/storage/db/core/tag/TagRecommendCacheCoreRepository.kt (1 hunks)
  • noweekend-storage/db-core/src/main/kotlin/noweekend/storage/db/core/tag/TagRecommendCacheJpaRepository.kt (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@toychip toychip merged commit 6d7d684 into develop Jul 16, 2025
1 of 2 checks passed
@toychip toychip deleted the fix/find-cachingquery branch July 16, 2025 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants