Skip to content

Conversation

@uhm0311
Copy link
Collaborator

@uhm0311 uhm0311 commented Oct 22, 2025

🔗 Related Issue

⌨️ What I did

  • NOT_SUPPORTED OperationStatus를 추가합니다.
    • NOT_SUPPORTED 응답을 받으면 SASL_OK 응답을 받은 것과 동일하게 처리합니다.
  • AuthException 클래스를 추가합니다.
    • 해당 클래스는 auth 과정 중에 서버로부터 SASL_OK, SASL_CONTINUE, NOT_SUPPORTED 외의 응답을 받았을 때에 발생하는 Exception 타입입니다.
    • AuthException 객체에는 서버에서 받은 응답 메세지가 저장됩니다.
    • AuthException이 발생하면 재연결 딜레이 타입을 DEFAULT로 하여 재연결을 시도합니다.
    • 재연결이 완료되면 AuthThread 객체를 생성하여 auth 과정을 처음부터 수행합니다.
  • AuthThread에서 맨 처음에 sasl mech 명령어를 보내도록 변경합니다.
    • unknown command 혹은 NOT_SUPPORTED 응답을 받으면 auth를 성공 처리하고 AuthThread를 종료합니다.
    • SASL 메커니즘 목록을 정상적으로 가져왔다면 sasl auth 명령어를 보내는 과정으로 넘어갑니다.
    • 그 외의 응답을 받은 경우 AuthException을 발생시키고 AuthThread를 종료합니다.
  • sasl auth, sasl step 명령어의 응답 처리를 개선합니다.
    • SASL_OK 혹은 NOT_SUPPORTED 응답을 받으면 auth를 성공 처리하고 AuthThread를 종료합니다.
    • SASL_CONTINUE 응답을 받으면 sasl step 명령어를 보냅니다.
    • 그 외의 응답을 받은 경우 AuthException을 발생시키고 AuthThread를 종료합니다.
  • reconnectBlocked 객체의 사용법을 개선합니다.
    • auth가 실패한 경우 reconnectBlocked에 들어가 있는 연산을 모두 캔슬시킵니다.

@jhpark816
Copy link
Collaborator

@uhm0311 @oliviarla @brido4125 @namsic
sasl 기능이 없는 캐시 서버로부터 "ERROR unknown command" 응답이 올 경우
immeidate reconnet 하면서 auth 기능을 skip 하는 처리가 너무 복잡합니다.
단순한 구현을 위해, 아래와 같이 구현을 변경하기로 하였습니다.

  • sasl mech 명령 추가 (binary 추가도 가능한 지 확인 필요)
  • sasl mech 명령에서 "ERROR unknown command" 응답이 오면, NOT_SUPPORTED와 동일하게 처리
    즉, 연결을 끊지 않고 auth는 완료 처리

@uhm0311 uhm0311 marked this pull request as draft October 22, 2025 05:46
@uhm0311 uhm0311 marked this pull request as ready for review October 22, 2025 07:36
jhpark816

This comment was marked as resolved.

jhpark816

This comment was marked as resolved.

jhpark816

This comment was marked as resolved.

@uhm0311 uhm0311 force-pushed the uhm0311/f/3 branch 2 times, most recently from 98104cc to 0faab2d Compare October 23, 2025 09:51
@uhm0311

This comment was marked as resolved.

jhpark816

This comment was marked as resolved.

jhpark816

This comment was marked as resolved.

@uhm0311

This comment was marked as resolved.

jhpark816

This comment was marked as resolved.

@uhm0311

This comment was marked as resolved.

@jhpark816

This comment was marked as resolved.

oliviarla
oliviarla previously approved these changes Oct 24, 2025
jhpark816

This comment was marked as resolved.

@jhpark816

This comment was marked as resolved.

@uhm0311

This comment was marked as resolved.

@uhm0311 uhm0311 force-pushed the uhm0311/f/3 branch 2 times, most recently from 4b68fe5 to 0b87a26 Compare October 28, 2025 03:50
@uhm0311 uhm0311 requested a review from jhpark816 October 28, 2025 03:50
Copy link
Collaborator

@jhpark816 jhpark816 left a comment

Choose a reason for hiding this comment

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

리뷰 완료

@jhpark816
Copy link
Collaborator

@uhm0311
수고했습니다.

@jhpark816 jhpark816 merged commit 90ee67f into naver:develop Oct 28, 2025
2 checks passed
@uhm0311 uhm0311 deleted the uhm0311/f/3 branch October 28, 2025 07:00
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.

3 participants