Skip to content

첨부파일 제한 처리 재작업#141

Open
yeomin4242 wants to merge 8 commits into
mainfrom
fe/dev/fix-attachment-duplicated-request#140
Open

첨부파일 제한 처리 재작업#141
yeomin4242 wants to merge 8 commits into
mainfrom
fe/dev/fix-attachment-duplicated-request#140

Conversation

@yeomin4242

Copy link
Copy Markdown
Member

#️⃣연관된 이슈

ex) #이슈번호, #이슈번호

#140

📝작업 내용

중복 클릭, 네트워크 재전송, 일시적 장애 상황에서도 동일 요청이 안전하게 처리되도록 FE에 멱등키 전달과 지수 백오프 재시도 로직을 적용했습니다.

주요 변경 사항

  • createIdempotencyKey() 공통 유틸을 추가해 write 계열 요청마다 고유 멱등키를 생성하도록 했습니다.
  • board, study, project 생성/수정/종료 요청에 X-Idempotency-Key 헤더를 전달하도록 반영했습니다.
  • withIdempotentRetry() 공통 재시도 유틸을 추가했습니다.
  • 재시도 간격은 300ms → 600ms → 1200ms + jitter 형태의 지수 백오프로 구성했습니다.
  • 재시도 대상은 네트워크 오류와 429, 502, 503, 504, 그리고 서버에서 REQUEST_IN_PROGRESS 성격으로 내려오는 409 응답으로 제한했습니다.
  • 작성/수정/종료 버튼 액션에서 동일 요청이 여러 번 전송되더라도 BE 멱등 처리와 연동될 수 있도록 흐름을 정리했습니다.

스크린샷 (선택)

필요 시 첨부

💬리뷰 요구사항(선택)

@yeomin4242 yeomin4242 requested review from joooii and minwoonggi April 1, 2026 01:12
@yeomin4242 yeomin4242 self-assigned this Apr 1, 2026
@yeomin4242 yeomin4242 added the feat 새로운 기능 추가 label Apr 1, 2026
@vercel

vercel Bot commented Apr 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fe Ready Ready Preview, Comment Apr 1, 2026 1:12am

@joooii joooii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

멱등성에 대해서 프론트에서도 작업이 필요한 줄 몰랐네요
또 한 수 배우고 갑니다 ... LGTM!


const res = idempotencyKey
? await withIdempotentRetry(execute)
: await execute();

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.

idempotencyKey 가없더라도 한 번 재시도 하는 이유가 있나요

Comment on lines 38 to +41
const handleEndRequest = async (attachment: AttachedFile) => {
if (submitting) return;
setSubmitting(true);
const idempotencyKey = createIdempotencyKey();

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.

핸들 함수 안에 createIndempotencyKey를 사용하면 요청 버튼 클릭시마다 새로운 난수가 요청되지 않나요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants