arcus-java-client icon indicating copy to clipboard operation
arcus-java-client copied to clipboard

INTERNAL: Not to cancel operations when node is removed from ZK but still alive.

Open uhm0311 opened this issue 9 months ago โ€ข 5 comments

๐Ÿ”— Related Issue

  • https://github.com/jam2in/arcus-works/issues/535

โŒจ๏ธ What I did

  • NodeLocator์—์„œ ๋…ธ๋“œ๋ฅผ ์ œ๊ฑฐํ•  ๋•Œ, ํ•ด๋‹น ๋…ธ๋“œ์™€์˜ ์†Œ์ผ“ ์—ฐ๊ฒฐ์ด ํ•ด์ œ๋˜์ง€ ์•Š์•˜๊ณ  Operation Queue๊ฐ€ ๋น„์–ด ์žˆ์ง€ ์•Š์œผ๋ฉด ์†Œ์ผ“ ์—ฐ๊ฒฐ์„ ํ•ด์ œ์™€ ์—ฐ์‚ฐ ์บ”์Šฌ์„ ์ˆ˜ํ–‰ํ•˜์ง€ ์•Š๊ณ  DelayedClosingNodes๋กœ ๋ถ„๋ฅ˜ํ•ฉ๋‹ˆ๋‹ค.
  • IO Thread๊ฐ€ DelayedClosingNodes๋กœ ๋ถ„๋ฅ˜๋œ ๋…ธ๋“œ๋“ค์„ ์ˆœํšŒํ•˜๋ฉฐ ๋‹ค์Œ์˜ ๋กœ์ง์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
    • ์†Œ์ผ“ ์—ฐ๊ฒฐ์ด ๋Š์–ด์ง„ ๋…ธ๋“œ๊ฐ€ ์žˆ๋‹ค๋ฉด ์—ฐ์‚ฐ์„ ๋ชจ๋‘ ์บ”์Šฌํ•˜๊ณ  DelayedClosingNodes์—์„œ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.
    • Operation Queue๊ฐ€ ๋น„์–ด ์žˆ๋Š” ๋…ธ๋“œ๊ฐ€ ์žˆ๋‹ค๋ฉด ์†Œ์ผ“ ์—ฐ๊ฒฐ์„ ํ•ด์ œํ•˜๊ณ  DelayedClosingNodes์—์„œ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.

uhm0311 avatar Apr 29 '24 02:04 uhm0311

handleNodesToRemove ๋ฉ”์„œ๋“œ๊ฐ€ ๋ณต์ œ์™€ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜์—์„œ๋„ ์‚ฌ์šฉ๋˜๋Š”๋ฐ, ํ•ด๋‹น ๋ถ€๋ถ„์—๋Š” ์˜ํ–ฅ์ด ์—†๋‚˜์š”?

oliviarla avatar Apr 29 '24 10:04 oliviarla

EE์—ฌ๋„ cache_list znode๊ฐ€ ์ œ๊ฑฐ๋˜์—ˆ์„ ๋•Œ ๋™์ž‘์€ CE์™€ ๋™์ผํ•ฉ๋‹ˆ๋‹ค. alter_list znode๊ฐ€ ์ œ๊ฑฐ๋˜์—ˆ์„ ๋•Œ๋Š” NodeLocator์—์„œ ์†Œ์ผ“ ์—ฐ๊ฒฐ์„ ํ•ด์ œํ•˜๋ฏ€๋กœ ์˜ํ–ฅ์ด ์—†์Šต๋‹ˆ๋‹ค.

uhm0311 avatar Apr 30 '24 00:04 uhm0311

์ฒซ๋ฒˆ์งธ ์ฝ”๋ฉ˜ํŠธ์— ์ปค๋ฐ‹ ์ˆ˜์ •์‚ฌํ•ญ์„ ์—…๋ฐ์ดํŠธ ํ–ˆ์Šต๋‹ˆ๋‹ค.

uhm0311 avatar Apr 30 '24 09:04 uhm0311

@oliviarla @brido4125 ๋จผ์ € ๋ฆฌ๋ทฐ ํ•˜์‹œ์ฃ .

jhpark816 avatar Apr 30 '24 12:04 jhpark816

https://github.com/jam2in/arcus-works/issues/549

ํ˜„์žฌ PR์—์„œ๋Š” locator์˜ update์™€ handleDelayedClosingNodes ๋ชจ๋‘ IO ์“ฐ๋ ˆ๋“œ์—์„œ ์ˆœ์ฐจ์ ์œผ๋กœ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

๋งŒ์•ฝ, ํ˜„์žฌ ์ง„ํ–‰์ค‘์ธ ์ด์Šˆ์ฒ˜๋Ÿผ locator์— ๋Œ€ํ•œ update ์ˆ˜ํ–‰์„ ๋‹ค๋ฅธ ์Šค๋ ˆ๋“œ๊ฐ€ ์ˆ˜ํ–‰ํ•  ๊ฒฝ์šฐ ํ•ด๋‹น ๊ตฌํ˜„๋„ ๋ณ€๊ฒฝ์ด ํ•„์š”ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

์ถ”ํ›„ ์ฐธ๊ณ ํ•  ๋ชฉ์ ์œผ๋กœ ํ•ด๋‹น ์ฝ”๋ฉ˜ํŠธ ๋‚จ๊น๋‹ˆ๋‹ค.

brido4125 avatar May 02 '24 02:05 brido4125