Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] 토큰 재발급 동시성 문제 해결 #237

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Dan2dani
Copy link
Member

@Dan2dani Dan2dani commented Sep 2, 2024

Related issue 🛠

Work Description ✏️

  • 토큰 재발급 동시성 이슈 해결
  • 원인: 토큰 재발급 로직(임계구역)에 대한 동시 접근 문제
  • 해결:
  1. Mutex를 활용해 임계구역에 lock을 걸음
  2. 재발급 받고자 하는 토큰의 유효성 확인

Screenshot 📸

Uncompleted Tasks 😅

  • Task1

To Reviewers 📢

자세한 사항은
https://sungah.notion.site/7bafc9a1f0cf49a5b381c9ff53887f56?pvs=4
확인해주세여!

Copy link
Collaborator

@jihyunniiii jihyunniiii left a comment

Choose a reason for hiding this comment

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

와 너무 신기하다 ㄷㄷ 고생하셨습니당 ㅠ

@@ -17,64 +21,166 @@ class AuthInterceptor @Inject constructor(
private val context: Application,
) : Interceptor {

// TODO dana 경우에 따른 분기 처리 필요
private val mutex = Mutex()
Copy link
Collaborator

Choose a reason for hiding this comment

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

요런 녀석이 있었군요

Copy link
Member

Choose a reason for hiding this comment

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

멋져요

Copy link
Member Author

Choose a reason for hiding this comment

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

감사합니달라
coroutine 동시 접근 문제는 보통 Mutex를 사용하는거 같더라고용

Copy link
Member

@jooyyoo jooyyoo left a comment

Choose a reason for hiding this comment

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

수고하셨습니다

@@ -17,64 +21,166 @@ class AuthInterceptor @Inject constructor(
private val context: Application,
) : Interceptor {

// TODO dana 경우에 따른 분기 처리 필요
private val mutex = Mutex()
Copy link
Member

Choose a reason for hiding this comment

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

멋져요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

토큰 재발급 동시성 이슈 해결
3 participants