Skip to content

feat: ranking tier threshold/#703#704

Merged
hjbin-25 merged 1 commit into
developfrom
feat/ranking-tier-threshold/#703
May 2, 2026
Merged

feat: ranking tier threshold/#703#704
hjbin-25 merged 1 commit into
developfrom
feat/ranking-tier-threshold/#703

Conversation

@chaeyn

@chaeyn chaeyn commented May 2, 2026

Copy link
Copy Markdown
Member

변경사항

  • 랭킹 티어 기준을 새 기준으로 변경했습니다.
  • 기존 유저 중 새 EXP 기준에 해당하는 유저가 승급되도록 마이그레이션을 추가했습니다.

관련 이슈

Closes #703

추가 컨텍스트

@chaeyn
chaeyn requested a review from hjbin-25 May 2, 2026 11:11

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the experience thresholds for various ranking tiers (Aura, Master, Diamond, and Gold) across the service logic, domain enums, and database. It includes a new SQL migration script to synchronize existing user data with the new thresholds and updates the corresponding unit tests. The review feedback suggests enhancing the SQL migration script by adding a secondary sort criteria to the ranking logic to ensure deterministic results when multiple users have the same experience points.

SELECT
id,
total_exp,
ROW_NUMBER() OVER (ORDER BY total_exp DESC) AS rank

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

ROW_NUMBER()를 사용할 때 ORDER BY total_exp DESC만 지정하면, 경험치가 동일한 유저들 사이의 순위가 비결정적(non-deterministic)으로 정해질 수 있습니다. Java 서비스의 정렬 로직과 일관성을 유지하고 안정적인 결과를 보장하기 위해 id와 같은 고유한 컬럼을 추가 정렬 기준으로 사용하는 것을 권장합니다.

        ROW_NUMBER() OVER (ORDER BY total_exp DESC, id ASC) AS rank

@hjbin-25
hjbin-25 merged commit bb01bef into develop May 2, 2026
1 check passed
@hjbin-25
hjbin-25 deleted the feat/ranking-tier-threshold/#703 branch May 2, 2026 11:15
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