Skip to content

Conversation

@hyerinhwang-sailin
Copy link
Collaborator

Related issue 🛠

Work Description ✏️

  1. Stamp 엔티티 확장
  • clap_count, view_count, version 필드 추가
  • 게시글별 총 박수/조회수 집계용 필드
  • 낙관적 락(@Version)으로 동시성 제어 준비
  • contents, images, activityDate 유효성 검증 로직 유지
  1. Clap 엔티티 신규 생성
  • (stamp_id, user_id) 유니크 제약으로 유저별 단일 레코드 보장
  • clap_count 0~50 제약(@check)으로 상한 보장
  • 낙관적 락(@Version) 추가 (동시 요청 재시도 대응)
  • incrementClapCount() 로직으로 클라의 debounce 요청 처리
  1. 정합성 / 동시성 고려
  • 기본은 낙관적 락(@Version) 기반 처리
  • 핫스팟 구간은 원자적 SQL(UPDATE ... RETURNING)로 대응 예정

Trouble Shooting ⚽️

Related ScreenShot 📷

Uncompleted Tasks 😅

To Reviewers 📢

@hyerinhwang-sailin hyerinhwang-sailin linked an issue Oct 17, 2025 that may be closed by this pull request
1 task
@hyerinhwang-sailin hyerinhwang-sailin self-assigned this Oct 17, 2025
Copy link
Member

@huncozyboy huncozyboy left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 !

따로 리뷰할 만한 내용은 없었던거같아요

columnNames = {"stamp_id", "user_id"}
)
)
@Check(constraints = "clap_count >= 0 AND clap_count <= 50")
Copy link
Member

Choose a reason for hiding this comment

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

DB 가드도 좋네요 👍🏻👍🏻

Comment on lines +41 to +42
@Version
private Long version;
Copy link
Member

Choose a reason for hiding this comment

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

PR에 적어주신대로 낙관적 락을 위한 필드로 이해하고 있을게요 ~~

@hyerinhwang-sailin hyerinhwang-sailin merged commit a6b4cbc into dev Oct 17, 2025
1 check passed
hyerinhwang-sailin added a commit that referenced this pull request Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 솝탬프 박수 기능 구현

3 participants