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

INTERNAL: return partial result if error or cancel occurred in getSome method of BulkGetFuture #808

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

oliviarla
Copy link
Collaborator

@oliviarla oliviarla commented Sep 19, 2024

๐Ÿ”— Related Issue

โŒจ๏ธ What I did

  • getSome()์—์„œ Error, Cancel์ด ๋ฐœ์ƒํ•˜๋”๋ผ๋„ ์กฐํšŒ๊ฐ€ ์™„๋ฃŒ๋œ ๊ฒฐ๊ณผ๋ฅผ ๋ฆฌํ„ดํ•˜๋„๋ก ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค.
  • InterruptException์ด ๋ฐœ์ƒํ•œ ๊ฒฝ์šฐ์—๋Š” ๊ทธ๋Œ€๋กœ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

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.

๋ฆฌ๋ทฐ ์™„๋ฃŒ

try {
return internalGet(duration, unit, false);
} catch (TimeoutException e) {
} catch (TimeoutException | ExecutionException e) {
throw new AssertionError("Something went wrong...", e);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Timeout๊ณผ Execution์„ ๋ณ„๋„ ๋ฉ”์„ธ์ง€๋กœ ์ฒ˜๋ฆฌํ•˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

์ œ ์ƒ๊ฐ์—๋Š” timeout๊ณผ execution ์˜ˆ์™ธ๋Š” internalGet(duration, unit, false) ๋ฉ”์„œ๋“œ๋ฅผ ์ฝ”๋“œ๋Œ€๋กœ ์ˆ˜ํ–‰ ์‹œ ๋ฐœ์ƒํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ๋ณ„๋„ ๋ฉ”์‹œ์ง€๋กœ ์ฒ˜๋ฆฌํ•  ํ•„์š”๊นŒ์ง€๋Š” ์—†์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Copy link
Collaborator

@brido4125 brido4125 Sep 20, 2024

Choose a reason for hiding this comment

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

์•„๋‹ˆ๋ฉด ๋ง์”€ํ•˜์‹ ๋Œ€๋กœ ํ•ด๋‹น ์˜ˆ์™ธ๋Š” ๋ฐœ์ƒํ•˜์ง€ ์•Š๋Š”๋‹ค๋ผ๋Š” ์—๋Ÿฌ ๋ฉ”์„ธ์ง€๋ฅผ ๋‚จ๊ธฐ๋Š”๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™๋„ค์š”.
"Something went wrong"์€ ๋„ˆ๋ฌด ์ถ”์ƒ์ ์ด๋ผ๊ณ  ์ƒ๊ฐ๋ฉ๋‹ˆ๋‹ค.

๋˜๋Š” ์˜ˆ์™ธ ๋Œ€์‹  log.error ์ฃผ์„์„ ํ†ตํ•ด ureachable ํ•œ ๋กœ์ง์ด๋ผ๋Š” ๊ฒƒ์„ ๋ช…์‹œํ•˜๋Š”๊ฒƒ๋„ ์ข‹์„๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

๋” ๋””ํ…Œ์ผํ•œ ๋ฉ”์‹œ์ง€๋กœ ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค.

@oliviarla oliviarla changed the title INTERNAL: return partial result if error or cancel occurred in getSomโ€ฆ INTERNAL: return partial result if error or cancel occurred in getSome method of BulkGetFuture Sep 20, 2024
brido4125
brido4125 previously approved these changes Sep 20, 2024
try {
return internalGet(duration, unit, false);
} catch (TimeoutException e) {
} catch (TimeoutException | ExecutionException e) {
throw new AssertionError("Something went wrong...", e);
Copy link
Collaborator

@brido4125 brido4125 Sep 20, 2024

Choose a reason for hiding this comment

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

์•„๋‹ˆ๋ฉด ๋ง์”€ํ•˜์‹ ๋Œ€๋กœ ํ•ด๋‹น ์˜ˆ์™ธ๋Š” ๋ฐœ์ƒํ•˜์ง€ ์•Š๋Š”๋‹ค๋ผ๋Š” ์—๋Ÿฌ ๋ฉ”์„ธ์ง€๋ฅผ ๋‚จ๊ธฐ๋Š”๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™๋„ค์š”.
"Something went wrong"์€ ๋„ˆ๋ฌด ์ถ”์ƒ์ ์ด๋ผ๊ณ  ์ƒ๊ฐ๋ฉ๋‹ˆ๋‹ค.

๋˜๋Š” ์˜ˆ์™ธ ๋Œ€์‹  log.error ์ฃผ์„์„ ํ†ตํ•ด ureachable ํ•œ ๋กœ์ง์ด๋ผ๋Š” ๊ฒƒ์„ ๋ช…์‹œํ•˜๋Š”๊ฒƒ๋„ ์ข‹์„๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

@jhpark816 jhpark816 merged commit 7c3f002 into naver:develop Sep 20, 2024
3 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.

3 participants