-
Notifications
You must be signed in to change notification settings - Fork 47
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
INTERNAL: Not to cancel operations when node is removed from ZK but still alive. #749
base: develop
Are you sure you want to change the base?
Conversation
handleNodesToRemove ๋ฉ์๋๊ฐ ๋ณต์ ์ ๋ง์ด๊ทธ๋ ์ด์ ์์๋ ์ฌ์ฉ๋๋๋ฐ, ํด๋น ๋ถ๋ถ์๋ ์ํฅ์ด ์๋์? |
EE์ฌ๋ cache_list znode๊ฐ ์ ๊ฑฐ๋์์ ๋ ๋์์ CE์ ๋์ผํฉ๋๋ค. |
String cause = "node removed."; | ||
cancelOperations(node.destroyReadQueue(false), cause); | ||
cancelOperations(node.destroyWriteQueue(false), cause); | ||
cancelOperations(node.destroyInputQueue(), cause); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํด๋น MemcachedNode์์ ์ฐ๊ฒฐ ์ฌ๋ถ์ ๋ฐ๋ผ ๋ฌ๋ฆฌ ์ฒ๋ฆฌํด์ผ ํ์ง ์๋ ์ง ?
๊ทธ๋ฆฌ๊ณ , ์ฌ๊ธฐ์์ queue์ ์๋ ์ฐ์ฐ๋ค์ ์ด๋ป๊ฒ ์ฒ๋ฆฌ๋๋ค๋ ์ฃผ์์ ๋ฌ์ ๋๋ฉด ์ข๊ฒ ์ต๋๋ค.
์์ continue ์ฝ๋๋ ๊ทธ๋๋ก ์ ์งํ๊ณ ์.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํด๋น MemcachedNode์์ ์ฐ๊ฒฐ ์ฌ๋ถ์ ๋ฐ๋ผ ๋ฌ๋ฆฌ ์ฒ๋ฆฌํด์ผ ํ์ง ์๋ ์ง ?
cache_list๋ alter_list๋ znode ์ ๊ฑฐ ์ NodeLocator์์ ํญ์ ์์ผ ์ฐ๊ฒฐ์ ํด์ ํ๊ธฐ ๋๋ฌธ์ ๋ฌ๋ฆฌ ์ฒ๋ฆฌํ ํ์๊ฐ ์์ต๋๋ค.
์์ continue ์ฝ๋๋ ๊ทธ๋๋ก ์ ์งํ๊ณ ์.
for๋ฌธ ๋ด์์ if (mgType == MigrationType.LEAVE)
์ดํ์ ์ํํ๋ ๋ก์ง์ด ์์ด์ ์ ๊ฑฐํ์ต๋๋ค.
๊ตณ์ด ๋์ด์ผ ํ๋์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cache_list๋ alter_list๋ znode ์ ๊ฑฐ ์ NodeLocator์์ ํญ์ ์์ผ ์ฐ๊ฒฐ์ ํด์ ํ๊ธฐ ๋๋ฌธ์ ๋ฌ๋ฆฌ ์ฒ๋ฆฌํ ํ์๊ฐ ์์ต๋๋ค.
cache server๊ฐ ๋ค์ด๋์ด์ ์์ผ ์ฐ๊ฒฐ์ด ์ด๋ฏธ ๋์ด์ง ๊ฒ์ด๋ผ๋ฉด ์ด์ฉ ์ ์์ง๋ง,
NodeLocater์์ znode ์ ๊ฑฐ ์์ ์์ผ ์ฐ๊ฒฐ์ ๋ฏธ๋ฆฌ closeํด ๋ฒ๋ฆฐ๋ค๋ฉด,
op queue์ ์๋ ์ฐ์ฐ๋ค์ ๊ธฐ์กด ์ฝ๋๋๋ก cancel ์ฒ๋ฆฌํ๋ ๊ฒ์ด ๋ง์ ๊ฒ์
๋๋ค.
ํด๋น ์ฐ์ฐ์ด ๊ณ์ ์ฒ๋ฆฌ๋๊ฒ ํ๋ ค๋ฉด, ์์ผ ์ฐ๊ฒฐ๋ delayed closeํ์ฌ์ผ ํฉ๋๋ค.
539d0e3
to
5444ff8
Compare
56005f1
to
4955858
Compare
4955858
to
ec00df8
Compare
์ฒซ๋ฒ์งธ ์ฝ๋ฉํธ์ ์ปค๋ฐ ์์ ์ฌํญ์ ์ ๋ฐ์ดํธ ํ์ต๋๋ค. |
@oliviarla @brido4125 ๋จผ์ ๋ฆฌ๋ทฐ ํ์์ฃ . |
39ff086
to
a9559bb
Compare
https://github.com/jam2in/arcus-works/issues/549 ํ์ฌ PR์์๋ locator์ update์ handleDelayedClosingNodes ๋ชจ๋ IO ์ฐ๋ ๋์์ ์์ฐจ์ ์ผ๋ก ์ํํฉ๋๋ค. ๋ง์ฝ, ํ์ฌ ์งํ์ค์ธ ์ด์์ฒ๋ผ locator์ ๋ํ update ์ํ์ ๋ค๋ฅธ ์ค๋ ๋๊ฐ ์ํํ ๊ฒฝ์ฐ ์ถํ ์ฐธ๊ณ ํ ๋ชฉ์ ์ผ๋ก ํด๋น ์ฝ๋ฉํธ ๋จ๊น๋๋ค. |
@@ -226,6 +227,10 @@ public void update(Collection<MemcachedNode> toAttach, | |||
for (MemcachedNode node : toDelete) { | |||
allNodes.remove(node); | |||
removeHash(node); | |||
if (node.hasOp() && node.isActive()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deley๋๊ฒ ์ ๊ฑฐํ ๋
ธ๋๋ผ๋ฉด ํ์ฌ ๋ก์ผ์ดํฐ์์ ๊ณง๋ฐ๋ก ํด๋น ๋
ธ๋๋ฅผ ์ ๊ฑฐํด๋ ๋๋์?
deley ์์ผ ์กฐ๊ธ์ด๋๋ง ์ฐ์ฐ์ ์ํ์ํค๋ ค๋ฉด ๋ก์ผ์ดํฐ์๋ ๋
ธ๋๊ฐ ์์ด์ผ ๋ ๊ฒ ๊ฐ์ต๋๋ค.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/jam2in/arcus-works/issues/535
์ด์์ ์ค๋ช ์ ๋ค์ ์ฝ์ด๋ณด์ธ์.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deley๋๊ฒ ์ ๊ฑฐํ ๋ ธ๋๋ผ๋ฉด ํ์ฌ ๋ก์ผ์ดํฐ์์ ๊ณง๋ฐ๋ก ํด๋น ๋ ธ๋๋ฅผ ์ ๊ฑฐํด๋ ๋๋์?
deley ์์ผ ์กฐ๊ธ์ด๋๋ง ์ฐ์ฐ์ ์ํ์ํค๋ ค๋ฉด ๋ก์ผ์ดํฐ์๋ ๋ ธ๋๊ฐ ์์ด์ผ ๋ ๊ฒ ๊ฐ์ต๋๋ค.
์ ์ฝ๋ฉํธ๋ ์ด๋ค ์๋ฏธ์ธ๊ฐ์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์บ์ ์์ฒญ์ด ํด์ ๋ง์ ์ํด ๋ถ๋ฐฐ๋๊ธฐ ์ ์ธ ์ํ์ ์์ฒญ์ ์ฒ๋ฆฌํด์ผํ์ง ์๋๋ผ๊ณ ์๊ฐํ์ต๋๋ค.
ํ์ง๋ง ๋ถ๋ฐฐ๋ ํ์ ์์ฒญ๋ค์ด ๋ณธ PR์ ๋์์ด๋ผ ๊ณ ๋ คํ์ง ์์๋ ๋ฉ๋๋ค.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์บ์ ์์ฒญ์ด ํด์ ๋ง์ ์ํด ๋ถ๋ฐฐ๋๊ธฐ ์ ์ธ ์ํ์ ์์ฒญ
๊ณผ ๋ถ๋ฐฐ๋ ํ์ ์์ฒญ
์ด ๋ฌด์์ธ์ง ์ค๋ช
๋ฐ๋๋๋ค.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brido4125
์บ์ ์์ฒญ์ด ํด์ ๋ง์ ์ํด ๋ถ๋ฐฐ๋๊ธฐ ์ ์ธ ์ํ์ ์์ฒญ
๊ณผ ๋ถ๋ฐฐ๋ ํ์ ์์ฒญ
์ด ๋ฌด์์ธ์ง๋ฅผ ์ค๋ช
ํด ์ฃผ์ธ์.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ถ๋ฐฐ๋ ํ์ ์์ฒญ์ด ํ์ ์ฝ์
๋๊ณ ๋ ์ดํ๋ฅผ ์๋ฏธํ๊ฒ์ด๊ณ ,
๋ถ๋ฐฐ๋๊ธฐ ์ ์ ํ์ ์ฝ์
๋๊ธฐ ์ ์ ์๋ฏธํ์ต๋๋ค.
@@ -226,6 +227,10 @@ public void update(Collection<MemcachedNode> toAttach, | |||
for (MemcachedNode node : toDelete) { | |||
allNodes.remove(node); | |||
removeHash(node); | |||
if (node.hasOp() && node.isActive()) { | |||
delayedClosingNodes.add(node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uhm0311
์ง๋ฌธ์ด ์์ต๋๋ค.
์ด์ ๊ฐ์ด ํด๋น node๊ฐ locator์ allNodes์์ ์ ์ธ๋ ๊ฒฝ์ฐ,
inputQ, writeQ, readQ์ ์๋ ์์ฒญ๋ค์ด ์ฒ๋ฆฌ๊ฐ ๋ ์ ์๋์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IO Thread๋ NodeLocator์ ๊ด๊ณ ์์ด ๋์ํ๋ฉฐ, closeChannel() ๋ฉ์๋๋ก ์์ผ ์ฐ๊ฒฐ์ ํด์ ํ์ง ์๋ ์ด์ ๋จ์ ์ฐ์ฐ์ ๊ณ์ ์ฒ๋ฆฌ๋ฉ๋๋ค.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oliviarla
์์ ์ฝ๋ฉํธ์ ๊ด๋ จ๋ ์ฝ๋๋ฅผ ํ์ธํด ์ฃผ์์ฃ .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uhm0311 ๋๊ป์ ๋ง์ํ์ ๊ฒ ์ฒ๋ผ allNodes์์ ์ ์ธ๋๋๋ผ๋ addedQueue์ MemcachedNode๊ฐ ์กด์ฌํ๊ณ ์๋ค๋ฉด inputQ์์๋ Operation๋ค์ด writeQ๋ก ๋์ด๊ฐ๊ณ , writeQ์ ์ฐ์ฐ๋ค์ด ์ฒ๋ฆฌ๋ฉ๋๋ค.
๐ Related Issue
โจ๏ธ What I did