Skip to content

merge: develop#705

Merged
hjbin-25 merged 3 commits into
mainfrom
develop
May 2, 2026
Merged

merge: develop#705
hjbin-25 merged 3 commits into
mainfrom
develop

Conversation

@hjbin-25

@hjbin-25 hjbin-25 commented May 2, 2026

Copy link
Copy Markdown
Member

변경사항

  • 메인머지

관련 이슈

Closes #

추가 컨텍스트

@hjbin-25 hjbin-25 merged commit 4216db2 into main May 2, 2026
1 check passed

@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 increases the maximum length for question content to 2000 characters across the JPA entity, DTOs, and database schema. It also lowers the experience thresholds for the AURA, MASTER, and DIAMOND ranking tiers and updates the corresponding assignment logic. Feedback was provided to address a non-deterministic issue in the SQL migration where ROW_NUMBER() is used without a unique secondary sort key, which could lead to inconsistent ranking results for users with identical 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

total_exp가 동일한 사용자가 여러 명 있을 경우, ROW_NUMBER()의 결과가 실행할 때마다 달라질 수 있는 비결정적(non-deterministic)인 문제가 있습니다. 이는 마이그레이션 결과와 향후 서비스 로직(RankingTierUpdateService) 간의 순위 불일치를 초래할 수 있으므로, id와 같은 고유 컬럼을 보조 정렬 키로 추가하여 순위를 고정하는 것이 좋습니다.

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

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