Skip to content

Conversation

@uhm0311
Copy link
Collaborator

@uhm0311 uhm0311 commented Nov 13, 2025

๐Ÿ”— Related Issue

  • ๊ธฐ์กด์— AuthThread๊ฐ€ IO Thread์™€ ๋ณ„๋„๋กœ ๋™์ž‘ํ•˜๋ฉด์„œ auth ์—ฐ์‚ฐ์„ ์š”์ฒญํ–ˆ๋‹ค.
  • ๋ฉ€ํ‹ฐ ์“ฐ๋ ˆ๋”ฉ ํŠน์„ฑ์œผ๋กœ ์ธํ•ด auth๊ฐ€ ์—ฐ๊ด€๋œ ์ž‘์—…์„ ํ•  ๋•Œ ๋™์‹œ์„ฑ ์ œ์–ด๋ฅผ ๊ณ„์† ์ƒ๊ฐํ•ด์•ผ ํ•˜๋Š” ๋‹จ์ ์ด ์žˆ๋‹ค.
  • AuthThread๋ฅผ ์ œ๊ฑฐํ•˜๊ณ  IO Thread๊ฐ€ ์Šค์Šค๋กœ auth ์—ฐ์‚ฐ์„ ์ˆ˜ํ–‰ํ•˜๋„๋ก ํ•˜๋ฉด ์ด๋Ÿฌํ•œ ๋‹จ์ ์„ ํ•ด์†Œํ•  ์ˆ˜ ์žˆ๋‹ค.

โŒจ๏ธ What I did

  • AuthThread์™€ ๊ด€๋ จ ์ฝ”๋“œ๋ฅผ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.
  • MemcachedConnection ํด๋ž˜์Šค์— prepareAuthentication() ๋ฉ”์†Œ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ auth ๊ด€๋ จ ์—ฐ์‚ฐ์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.
  • prepareAuthentication() ๋ฉ”์†Œ๋“œ์— auth ๋กœ์ง์ด ๋ชจ๋‘ ํฌํ•จ๋˜์–ด ์žˆ์–ด์„œ, ์—ฐ๊ฒฐ์ด ์™„๋ฃŒ๋  ๋•Œ๋งˆ๋‹ค prepareAuthentication()๋ฅผ 1ํšŒ๋งŒ ํ˜ธ์ถœํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

@uhm0311 uhm0311 requested a review from jhpark816 November 13, 2025 07:37
@jhpark816 jhpark816 requested review from oliviarla and removed request for jhpark816 November 13, 2025 07:46
@uhm0311 uhm0311 force-pushed the uhm0311/f/3 branch 4 times, most recently from c3c782f to d02b629 Compare November 14, 2025 01:37
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.

์ผ๋ถ€ ๋ฆฌ๋ทฐ

if (authDescriptor != null) {
authMonitor.authConnection(conn, opFact, authDescriptor, node);
}
// Don't care.
Copy link
Collaborator

Choose a reason for hiding this comment

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

MemcacheClient๋Š” ๋” ์ด์ƒ ConnectionObserver๋ฅผ ๊ตฌํ˜„ํ•  ํ•„์š”๊ฐ€ ์—†์–ด ๋ณด์ž…๋‹ˆ๋‹ค.

inputQueue.drainTo(tmp);
inputQueue.addAll(tmp);
writeQ.drainTo(tmp);
writeQ.addAll(tmp);
Copy link
Collaborator

@jhpark816 jhpark816 Nov 14, 2025

Choose a reason for hiding this comment

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

@uhm0311
์งˆ๋ฌธ์ž…๋‹ˆ๋‹ค.
writeQ๋Š” empty ์ƒํƒœ์ผ ๊ฒƒ ๊ฐ™์€ ๋ฐ, ์•„๋‹ ์ˆ˜๋„ ์žˆ๋‚˜์š”?

์˜ˆ์ „ ๊ตฌํ˜„์—์„œ๋„ inputQueue๊ฐ€ empty์ผ ๊ฒƒ ๊ฐ™์€ ๋ฐ์š”.
inputQueue์— op๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ์Œ์„ ๊ฐ€์ •ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
์ด๋ ‡๊ฒŒ ํ•  ํ•„์š”๊ฐ€ ์žˆ๋Š” ์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค.

Copy link
Collaborator Author

@uhm0311 uhm0311 Nov 14, 2025

Choose a reason for hiding this comment

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

Queue๊ฐ€ ๋น„์–ด ์žˆ๋Š” ๊ฒƒ์€ ํ™•์‹คํ•ฉ๋‹ˆ๋‹ค.
๊ธฐ์กด ์ฝ”๋“œ๋ฅผ ๊ฑฐ์˜ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ, ๋น„์–ด ์žˆ์œผ๋‹ˆ ๊ทธ๋ƒฅ ๋งˆ์ง€๋ง‰์— ์—ฐ์‚ฐ์„ ์ถ”๊ฐ€ํ•˜๋„๋ก ํ• ๊นŒ์š”?

final Operation priorAuthOp = authOperations.remove(node);
if (priorAuthOp != null && priorAuthOp.getState() != OperationState.COMPLETE) {
priorAuthOp.cancel("Authentication is not completed until the reconnection.");
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

๋งˆ์ง€๋ง‰ ์งˆ๋ฌธ์ž…๋‹ˆ๋‹ค.
authOperations์— ๋‚จ์€ op๊ฐ€ complete๋˜์ง€ ์•Š์•˜๋‹ค๋ฉด, cancelํ•˜๋Š” ๋กœ์ง์ธ๋ฐ์š”. ์–ด๋–ค ๊ฒฝ์šฐ๋ฅผ ๋Œ€๋น„ํ•˜๊ธฐ ์œ„ํ•จ์ธ๊ฐ€์š”?

ํ˜น์‹œ, ๊ธฐ์กด auth thread monitor์— ์œ„์˜ ๋กœ์ง์ด ์žˆ์–ด์„œ ์ด๋ฅผ ๋™์ผํ•˜๊ฒŒ ๊ตฌํ˜„ํ•ด ๋‘” ๊ฒƒ์ธ๊ฐ€์š”?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ํ˜น์‹œ, ๊ธฐ์กด auth thread monitor์— ์œ„์˜ ๋กœ์ง์ด ์žˆ์–ด์„œ ์ด๋ฅผ ๋™์ผํ•˜๊ฒŒ ๊ตฌํ˜„ํ•ด ๋‘” ๊ฒƒ์ธ๊ฐ€์š”?

๋™์ผํ•˜๊ฒŒ ๊ตฌํ˜„ํ•˜๋ ค๊ณ  ํ–ˆ์Šต๋‹ˆ๋‹ค.
์ œ๊ฐ€ ๋ณด๊ธฐ์—๋Š” ์ด ์กฐ๊ฑด๋ฌธ ์•ˆ์œผ๋กœ ๋“ค์–ด์˜ฌ ์ˆ˜ ์žˆ๋Š” ๊ฒฝ์šฐ๋Š” ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
์ด ์ฝ”๋“œ๋ฅผ ์ œ๊ฑฐํ•˜๋„๋ก ํ• ๊นŒ์š”?

Copy link
Collaborator

Choose a reason for hiding this comment

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

์˜ˆ. ์ œ๊ฑฐํ•˜์‹œ์ฃ .

@jhpark816
Copy link
Collaborator

@oliviarla @brido4125
์ˆ˜์ • ์ฝ”๋“œ๋ฅผ ํ™•์ธํ•ด ๋‘๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.

@jhpark816 jhpark816 merged commit a29355c into naver:develop Nov 17, 2025
2 checks passed
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