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

CLEANUP: Refactor methods of setting ritems #747

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ing-eoking
Copy link
Collaborator

@ing-eoking ing-eoking commented Mar 26, 2024

๐Ÿ”— Related Issue

  • jam2in/arcus-works#493

โŒจ๏ธ What I did

  • ์ถ”๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ด๋Š” ๊ณต๊ฐ„์ธ rlist๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ritem_set_first / ritem_set_next, RTYPE ๋ฅผ ์ œ๊ฑฐํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๊ด€๋ จ ํ•จ์ˆ˜ add_ritem / add_ritem_mblck / add_ritem_einfo / add_ritem_hinfo๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • conn_nread๋ฅผ ๋ณ€๊ฒฝ๋œ ๋ฐฉ์‹์— ๋งž๊ฒŒ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • rlist์˜ ๋ฉ”๋ชจ๋ฆฌ ๋ถ€์กฑ ์ฒ˜๋ฆฌ๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด์„œ ์ผ๋ถ€ ์—๋Ÿฌ ํ•ธ๋“ค๋ง์„ ์•„๋ž˜์˜ PR์ฒ˜๋Ÿผ ํ†ต์ผ์‹œ์ผฐ์Šต๋‹ˆ๋‹ค.

@ing-eoking ing-eoking marked this pull request as draft March 26, 2024 02:17
@ing-eoking ing-eoking force-pushed the ritem branch 2 times, most recently from 26fb268 to 2470626 Compare March 26, 2024 08:11
@ing-eoking ing-eoking marked this pull request as ready for review March 26, 2024 08:15
@ing-eoking ing-eoking requested review from jhpark816 and namsic March 26, 2024 08:15
@jhpark816

This comment was marked as resolved.

memcached.c Outdated Show resolved Hide resolved
memcached.c Outdated Show resolved Hide resolved
@ing-eoking ing-eoking force-pushed the ritem branch 2 times, most recently from ef3e0ff to f1ab61b Compare March 27, 2024 00:11
@ing-eoking ing-eoking requested a review from namsic March 27, 2024 00:13
jhpark816

This comment was marked as resolved.

@ing-eoking ing-eoking marked this pull request as draft March 28, 2024 07:39
@ing-eoking ing-eoking self-assigned this Mar 29, 2024
@ing-eoking ing-eoking force-pushed the ritem branch 8 times, most recently from eed606d to 414953c Compare March 29, 2024 02:42
@ing-eoking ing-eoking marked this pull request as ready for review March 29, 2024 02:55
@ing-eoking

This comment was marked as resolved.

@ing-eoking

This comment was marked as resolved.

@namsic
Copy link
Collaborator

namsic commented Mar 29, 2024

add_ritem_e/hinfo ๋˜ํ•œ ๋กœ์ง์€ add_iov_e/hinfo_ascii/bin์™€ ์œ ์‚ฌํ•˜๋‹ค๊ณ  ์ƒ๊ฐ๋ฉ๋‹ˆ๋‹ค.
add_ritem_e/hinfo_ascii/bin์œผ๋กœ ๋ถ„๋ฆฌํ• ๊นŒ์š”?
add_ritem_mblck๋Š” ๋‘˜๋‹ค(ASCII, Binary) ๊ฐ™์€ ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜๋ฏ€๋กœ ๋ถ„๋ฆฌ X

์ง€๊ธˆ ๊ตฌํ˜„ ๊ธฐ์ค€์œผ๋กœ๋Š” protocol ๊ฐ„ ์ฝ”๋“œ ์ฐจ์ด๊ฐ€ ๊ฑฐ์˜ ์—†์–ด์„œ ๋ถ„๋ฆฌํ•˜์ง€ ์•Š์•„๋„ ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

jhpark816

This comment was marked as resolved.

jhpark816

This comment was marked as resolved.

@ing-eoking ing-eoking force-pushed the ritem branch 9 times, most recently from fc548b5 to cb5ce60 Compare April 5, 2024 03:30
@ing-eoking

This comment was marked as resolved.

memcached.c Outdated Show resolved Hide resolved
@ing-eoking ing-eoking force-pushed the ritem branch 2 times, most recently from 77ba1ea to a4f8c9d Compare April 5, 2024 08:57
@ing-eoking

This comment was marked as resolved.

@ing-eoking ing-eoking requested a review from jhpark816 April 5, 2024 08:59
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.

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

memcached.c Show resolved Hide resolved
@ing-eoking ing-eoking requested a review from jhpark816 April 8, 2024 01:25
@ing-eoking ing-eoking force-pushed the ritem branch 2 times, most recently from d99d920 to 9dab785 Compare May 2, 2024 06:28
@ing-eoking ing-eoking marked this pull request as ready for review October 24, 2024 03:08
@ing-eoking
Copy link
Collaborator Author

ing-eoking commented Oct 24, 2024

@jhpark816 @namsic
ํ•ด๋‹น ์ž‘์—…๋„ ์กฐ๊ธˆ์”ฉ ์ง„ํ–‰ํ•ด์•ผ ํ•˜๊ธฐ์— ์ด์ „ ๋…ผ์˜ ๋‚ด์šฉ์„ ์žฌ์ •๋ฆฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

  1. ์ถ”๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ๊ธฐ ์œ„ํ•œ nread์— ํ•„์š”ํ•œ ritem_set_first์™€ ritem_set_next ํ•จ์ˆ˜๊ฐ€ ์กด์žฌ
  2. ritem_set_first๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์–ด๋“ค์ผ ๊ณต๊ฐ„ ์ค‘ ์ฒซ ๋ฒˆ์งธ๋ฅผ ์ง€์ •ํ•˜๋Š” ํ•จ์ˆ˜๋กœ, ํ”„๋กœํ† ์ฝœ ๋ชจ๋“ˆ์—์„œ๋งŒ ์‚ฌ์šฉ
  3. ritem_set_next๋Š” ์ด์ „ ๋ฐ์ดํ„ฐ ๊ณต๊ฐ„์ด ๊ฐ€๋“ ์ฐผ์„ ๋•Œ ๋‹ค์Œ ๋ฐ์ดํ„ฐ ๊ณต๊ฐ„์œผ๋กœ ์ „ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜๋กœ, core์—์„œ๋งŒ ํ™œ์šฉ
  4. ์ด ํ•จ์ˆ˜๋“ค์˜ ์˜๋ฏธ์ƒ ๋ณ„๋„์˜ ๋ชจ๋“ˆ๋กœ ๋ถ„๋ฆฌํ•˜๊ธฐ ๋ณด๋‹ค๋Š” ํ•จ๊ป˜ ๋‘๋Š” ๊ฒƒ์ด ๋” ์ ์ ˆํ•˜๋‹ค๊ณ  ํŒ๋‹จ
  5. ๋”ฐ๋ผ์„œ, ritem_set_first์™€ ritem_set_next ์—†์ด๋„ ๋ชจ๋“  ๋ฐ์ดํ„ฐ์— ์ง์ ‘ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š” rlist๋ฅผ ๋‘๊ณ  ์ด๋ฅผ ํ™œ์šฉ
  6. ํ”„๋กœํ† ์ฝœ ๋ชจ๋“ˆ์—์„œ๋Š” add_ritem์„ ํ†ตํ•ด ๋ฐ์ดํ„ฐ ๊ณต๊ฐ„์„ rlist์— ๋‹ด์•„ core์— ์ „๋‹ฌํ•˜๋ฉฐ, core๋Š” ์ด๋ฅผ ํ™œ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ๋Š” ๋ฐฉ์‹์œผ๋กœ ์ž‘๋™

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