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: use bkey instead of subkey when it only related to btree #772

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

oliviarla
Copy link
Collaborator

@oliviarla oliviarla commented Jul 3, 2024

๐Ÿ”— Related Issue

โŒจ๏ธ What I did

  • btree์—์„œ๋งŒ ์‚ฌ์šฉ๋˜๋Š” ๋ฉ”์„œ๋“œ/ํ•„๋“œ์˜ ๊ฒฝ์šฐ subkey๋ผ๋Š” ์šฉ์–ด ๋Œ€์‹  bkey๋ผ๋Š” ์šฉ์–ด๋ฅผ ์‚ฌ์šฉํ•˜๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.
  • btree์™ธ์— list, set, map์—์„œ ํ•จ๊ป˜ ์‚ฌ์šฉ๋˜๋Š” ๋ฉ”์„œ๋“œ/ํ•„๋“œ์˜ ๊ฒฝ์šฐ ๋ณ€๊ฒฝํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.
  • BinaryOperationFactory์—์„œ ์‚ฌ์šฉ๋˜์ง€ ์•Š๋Š” collectionInsert ๋ฉ”์„œ๋“œ๋ฅผ ์ œ๊ฑฐํ–ˆ์Šต๋‹ˆ๋‹ค.
  • CollectionGet ์ถ”์ƒ ํด๋ž˜์Šค์˜ ๊ฒฝ์šฐ subkey ํ•„๋“œ๊ฐ€ ์กด์žฌํ•˜๊ณ , ์ด๋ฅผ ListGet, MapGet, BTreeGet, BTreeFindPositionWithGet ๋“ฑ ์ƒ์†ํด๋ž˜์Šค์—์„œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์„œ BTreeGet, BTreeFindPositionWithGet ๋‚ด๋ถ€์ ์œผ๋กœ bkey๋ผ๋Š” ์šฉ์–ด๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ๊ตฌ์กฐ๋Š” ์ด์Šˆ๋ฅผ ์ƒ์„ฑํ•ด ๋‹ค๋ฅธ PR๋กœ ๊ฐœ์„ ํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

@oliviarla oliviarla requested review from jhpark816 and uhm0311 July 3, 2024 10:26
uhm0311
uhm0311 previously approved these changes Jul 3, 2024
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.

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

@@ -448,12 +448,12 @@ CollectionPipedUpdateOperation collectionPipedUpdate(String key,
* Increment/Decrement operation for collection items (b+tree items).
*
* @param key b+tree item's key
* @param subkey element key
* @param bkey b+tree item's bkey
Copy link
Collaborator

Choose a reason for hiding this comment

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

"b+tree element's key"๋กœ ํ‘œํ˜„ํ•˜๋Š” ๊ฒƒ์ด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค.

@@ -271,10 +271,10 @@ public BTreeGetBulkOperation bopGetBulk(BTreeGetBulk<?> getBulk,

@Override
public CollectionMutateOperation collectionMutate(String key,
String subkey,
String bkey,
Copy link
Collaborator

Choose a reason for hiding this comment

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

๋ฉ”์†Œ๋“œ ๋ช…์ด๋‚˜ ๋ฆฌํ„ด ํƒ€์ž… ๋“ฑ์„ ๋ด์„œ๋Š” b+tree ํ•œ์ •๋œ ์—ฐ์‚ฐ์ด ์•„๋‹ˆ๋ฏ€๋กœ subkey ์šฉ์–ด๋ฅผ ๊ทธ๋Œ€๋กœ ๋‘์–ด์•ผ ํ•˜์ง€ ์•Š๋Š” ์ง€?

์•„๋งˆ b+tree์—์„œ๋งŒ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  ๋ณ€๊ฒฝํ•œ ๊ฒƒ์œผ๋กœ ๋ณด์ด๋Š” ๋ฐ,
ํ–ฅํ›„ ๋‹ค๋ฅธ collection(์˜ˆ, map)์—์„œ๋„ ์ด ์—ฐ์‚ฐ์„ ์ œ๊ณต๋  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
์–ด๋–ป๊ฒŒ ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์„๊นŒ์š”?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ํ–ฅํ›„ ์ œ๊ณต๋  ๊ฐ€๋Šฅ์„ฑ์ด ๋†’๋‹ค๋ฉด ๊ทธ๋Œ€๋กœ ๋‘๊ฒ ์Šต๋‹ˆ๋‹ค.
๋‹ค๋งŒ, ๋ณธ PR์—์„œ ์ˆ˜์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค ํ•˜๋”๋ผ๋„ subkey๋ผ๋Š” ๋งž์ง€ ์•Š๋Š” ์šฉ์–ด๋ฅผ ๊ทธ๋Œ€๋กœ ์“ฐ๊ณ  ์žˆ๋Š” ๊ฒƒ ์ž์ฒด๊ฐ€ ๋ฌธ์ œ๋ผ์„œ ์ถ”ํ›„ ๋‹ค๋ฅธ๋ฐฉ์•ˆ์„ ์ƒ๊ฐํ•ด์•ผ ํ•  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Copy link
Collaborator

Choose a reason for hiding this comment

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

์ด ๋ถ€๋ถ„์€ ํ˜„์žฌ PR์ฒ˜๋Ÿผ bkey๋กœ ๋ณ€๊ฒฝํ•˜๋Š” ๊ฑธ๋กœ ํ•ฉ์‹œ๋‹ค.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

์–ด์ฐจํ”ผ ๋‚˜์ค‘์— collectionInsert, collectionUpdate ๋“ฑ์—์„œ subkey ์šฉ์–ด๋ฅผ ๋ณ€๊ฒฝํ•  ๋•Œ ํ•œ๊บผ๋ฒˆ์— ์ฒ˜๋ฆฌํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™์•„, ์ด PR์—์„œ๋Š” ๋ณ€๊ฒฝ ์•ˆํ•˜๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ๊ดœ์ฐฎ์œผ์‹ ๊ฐ€์š”?

Copy link
Collaborator

Choose a reason for hiding this comment

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

์˜ˆ. ๊ทธ๋ ‡๊ฒŒ ํ•˜์‹œ์ฃ .

@oliviarla
Copy link
Collaborator Author

@jhpark816 ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

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.

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

@@ -59,14 +59,14 @@ public class CollectionMutateOperationImpl extends OperationImpl implements
false, "OUT_OF_RANGE", CollectionResponse.OUT_OF_RANGE);

protected final String key;
protected final String subkey;
protected final String bkey;
Copy link
Collaborator

Choose a reason for hiding this comment

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

์—ฌ๊ธฐ๋Š” CollectionMutateOperation ์ž…๋‹ˆ๋‹ค.

@oliviarla
Copy link
Collaborator Author

@jhpark816 ๋ฐ˜์˜ํ–ˆ์Šต๋‹ˆ๋‹ค.

@jhpark816 jhpark816 merged commit eee0b46 into naver:develop Jul 4, 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